Forms using Bookmarks

  • Thread starter Thread starter Johnnyboy5
  • Start date Start date
J

Johnnyboy5

I am learning to make a user form.

how can i see the bookmarks I have put in the document at the same
time as entering the codes in the "View code" just to make sure i am
putting the right names against the right boxes etc.

Also is there a short cut to the View Code screen.


Johnnyboy
 
If you don't get an answer here, try asking in
microsoft.public.word.vba.userforms

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
If you don't get an answer here, try asking in
microsoft.public.word.vba.userforms

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USAhttp://word.mvps.org

ok - cool
 
Here are two suggestions for seeing the list of bookmark names:

1. Click in the document and display the Bookmarks dialog (shortcut: Alt+I, then K). Unfortunately, you can't type in the code while that dialog is displayed.

2. In the VBA editor, click View > Immediate Window. Then run this little macro to make a list of the bookmarks appear in the Immediate Window:

Sub x()
Dim bk As Bookmark
For Each bk In ActiveDocument.Bookmarks
Debug.Print bk.Name
Next
End Sub

The shortcut to the View Code screen is F7, and the shortcut to the design screen is Shift+F7 (these are listed on the right side of the View menu in the editor).
 
Here are two suggestions for seeing the list of bookmark names:

1. Click in the document and display the Bookmarks dialog (shortcut: Alt+I, then K). Unfortunately, you can't type in the code while that dialog is displayed.

2. In the VBA editor, click View > Immediate Window. Then run this littlemacro to make a list of the bookmarks appear in the Immediate Window:

Sub x()
Dim bk As Bookmark
For Each bk In ActiveDocument.Bookmarks
    Debug.Print bk.Name
Next
End Sub

The shortcut to the View Code screen is F7, and the shortcut to the design screen is Shift+F7 (these are listed on the right side of the View menu in the editor).

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroupso all may benefit.

Loving your work - nice macro - just what I needed - learning fast.

Johnny
 
Back
Top