General information
Category:
COM/DCOM and 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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only