Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
Goto Bookmark in Word document
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.
I’m receiving an error saying that the bookmark does not exists.
However, I can see the bookmarks through the ActiveDocument.Documents.BookMarks object list an I can tell it is there
I guess it could be the way I’m calling the Word-VB GoTo method
My code looks like this: this.oWord.ActiveDocument.goto(-1, 1, 1, lcMarcador)
Where oWord is a reference to the Word application, -1 means “go to a bookmark”, second and third parameters are optional and they could be problem, since I do not know what to send when I do not need them in order to perform the Goto. LcMarcador contains the exact name I can use from within the word document to perform the Goto succesfully, but not working from VFP.
Any hints will be appreciated
Thanks in advance
Oscar Corte
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