Hallo there,
if it was in VBA, it would have been written like this:
However, using VBA with ActiveX Im typing it something like this:
where
Unfortunately, the GoTo command doesnt work "no such bookmark found", although there is such bookmark.
Now,
1) how can I find out, what is exactly the problem ?
2) where can I found, the values of the whats, and whichs (e.g. wdGotoBookmark is -1)
Thank you in advance,
if it was in VBA, it would have been written like this:
Code:
Selection.GoTo What:=wdGoToBookmark, Name:="myBookmark"
With ActiveDocument.Bookmarks
.DefaultSorting = wdSortByName
.ShowHidden = False
End With
Selection.TypeText Text:="ABA"
However, using VBA with ActiveX Im typing it something like this:
Code:
[FONT=Courier New][SIZE=2]
[SIZE=2][FONT=Courier New]hdlActiveX = actxserver([/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'Word.Application'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);[/SIZE][/FONT]
[/SIZE][/FONT]hdlActiveX.Selection.GoTo(what, which,count,'myBookmark')
where
Code:
what = -1 % [FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]wdGotoBookmark[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]which = 1 % [FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]wdGoToAbsolute[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]count = 1
Unfortunately, the GoTo command doesnt work "no such bookmark found", although there is such bookmark.
Now,
1) how can I find out, what is exactly the problem ?
2) where can I found, the values of the whats, and whichs (e.g. wdGotoBookmark is -1)
Thank you in advance,