How to Create Hidden Bookmarks

Last reviewed: February 5, 1998
Article ID: Q152770
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, version 7.0

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.


KBCategory: kbusage kbmacro kbhowto
KBSubcategory:

Additional query words: 6.0 6.0a 6.0c winword word6 bookmarks hidden
Version : 6.0 6.0a 6.0c 7.0
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.