>Eric, Thank u for your reply.
>I didn't get your idea clearly, could you please give me more explination, or a sample code if possible.
You can create a Word document that contains bookmarks (menu Insert -> Bookmark...). Then you can use the code snippet bellow to insert values into these bookmarks.
Private Sub Command1_Click()
Dim objWord As Word.Application
Set objWord = New Word.Application
With objWord
.Visible = True
.Documents.Open "c:\test.doc"
.ActiveDocument.Bookmarks.Item("aa").Select
.Selection.InsertAfter "Hello"
Stop
.Quit False
End With
Set objWord = Nothing
End Sub
If you give the user a list of bookmarks that you can feed, users can build the documents they want without any intervention.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com