Code conversion from Wordbasic

J

John

Hi,

Can anyone suggest why the first line works fine and the second ones fails
to find the bookmark?

WordBasic.WW7_EditGoTo "bmOrdPresent"

Selection.GoTo what:=Bookmarks, Name:="bmOrdPresent"

Thanks,

John
 
J

Jezebel

Because "Bookmarks" is not a defined constant in VBA. One of the benefits of
VBA is that you can put the cursor on any keyword (such as GoTo) and press
F1 to see the Help for that keyword. Which would show you that you want --

What:=wdGoToBookmark.
 
J

John

Thanks. Explanation very helpful.

John

Jezebel said:
Because "Bookmarks" is not a defined constant in VBA. One of the benefits
of VBA is that you can put the cursor on any keyword (such as GoTo) and
press F1 to see the Help for that keyword. Which would show you that you
want --

What:=wdGoToBookmark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top