Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the Best Way ?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00525067
Message ID:
00525600
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform