Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is the Best Way ?
Message
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00525067
Message ID:
00525600
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform