WD: How to Create Hidden Bookmarks

Q152770


The information in this article applies to:


SUMMARY

This article describes how to create bookmarks that cannot be accessed from the Bookmark dialog box (Edit menu). Bookmarks that begin with the underscore character are hidden. In other words, they will not appear in the Bookmark dialog box nor will they appear in your document when you select Bookmarks on the View tab.(To locate this option, click options on the Tools menu, and then select the View tab.)

These bookmarks cannot be created or deleted manually. Instead, you can create, go to, and delete them using a WordBasic macro.


MORE INFORMATION

WARNING: ANY USE BY YOU OF THE OR MACRO CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

To create a hidden bookmark, use the following macro:


   Sub MAIN
      EditBookmark .Name = "_HiddenBkMk1", .Add
   End Sub 
If you have text selected in a document and run this macro, a bookmark will be set at that position. To get back to that bookmark, create the following macro:
EditBookmark .Name = "_HiddenBkMk1", .Goto
To delete a hidden bookmark, create the following macro:

   Sub MAIN
      EditBookmark .Name = "_HiddenBkMk1", .Delete
   End Sub 
These bookmarks have the same characteristics as any other bookmarks. They can be added, changed, and deleted. The only difference is that they are hidden from the user's sight.

Additional query words: 6.0 winword word6 bookmarks hidden

Keywords :
Issue type :
Technology : kbWordSearch kbWord700Search kbZNotKeyword2 kbWord600 kbWord600a kbWord600c kbWord700


Last Reviewed: November 5, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.