Information générale
Catégorie:
COM/DCOM et OLE Automation
>I’m using VFP to automate a Word document.
>
>I need to go to a specific bookmark in order to place some data in it.
The best way to do this is similar to what Daniel showed you, but avoids using the Select object:
oBookmark = This.oWord.ActiveDocument.Bookmarks(lcMarcador).Range()
Now you have a range object to manipulate that is exactly the bookmark area.
>My code looks like this: this.oWord.ActiveDocument.goto(-1, 1, 1, lcMarcador)
If you really want to do it this way, the secret is that you have to omit the second and third parameters to make it work:
This.oWord.ActiveDocument.Goto(-1,,,lcMarcador)
Tamar
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement