Information générale
Catégorie:
COM/DCOM et OLE Automation
>I recorded a macro of the operation. The VBA code is Selection.GoTo What:=wdGoToBookMark, Name:="RegisName". I include a type library so that the constant wdGoToBookMark gets tranlated to the value -1.
>
>I Translate the named parameters to ordered parameters in the Fox code: oWord.Selection.Goto(wdGoToBookMark,"RegisName"). But the insertion point doesn't go the the bookmark named RegisName.
>
In fact, once you know that a bookmark exists, you don't need to use Goto. Just address it directly in the Bookmarks collection:
oRange = oWord.ActiveDocument.Bookmarks("RegisName")
However, if you really want to use Goto, the secret is to omit the parameters that aren't in the macro.
Tamar
Précédent
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