Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Goto Bookmark in Word document
Message
From
08/05/2003 08:04:32
 
 
To
07/05/2003 20:56:12
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00786077
Message ID:
00786154
Views:
43
>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
Map
View

Click here to load this message in the networking platform