Microsoft KB Archive/69496

-

{| The information in this article applies to:
 * width="100%"|
 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c

SUMMARY
There are several reserved bookmarks that can be set and automatically updated in Word for Windows using the WordBASIC macro language.

MORE INFORMATION
Bookmarks can be set in a Word for Windows document as a way of getting to a specific reference point quickly from anywhere in the document. You can set defined bookmarks manually or use the reserved bookmarks that Word places in a document and automatically updates. These reserved bookmarks and their definitions are listed along with examples on pages 103-107 of the &quot;Microsoft Word for Windows and OS/2 Technical Reference.&quot;

The reserved bookmarks can be used with several WordBASIC statements in macros for specific tasks. One useful WordBASIC statement used with reserved bookmarks is the CmpBookmarks statement. This statement is used to compare bookmarks. This can be useful in performing a particular task on text between two bookmarks.

For example:

Sub Main While CmpBookmarks (&quot;\Sel&quot;, &quot;\EndOfDoc&quot;). . . Wend End Sub This macro sets one bookmark at the current selection or the insertion point (\Sel), and one bookmark at the end of the document (\EndOfDoc) and executes the commands listed between the While and Wend statements until Sel is equal to EndOfDoc. As a result, the desired action is performed on the text from the initial position of the cursor to the end of the document. This is just one example of how the special reserved bookmarks can be used in Word for Windows. Reference(s):

&quot;Using WordBasic,&quot; by WexTech Systems and Microsoft, pages 88-90.

&quot;Microsoft Word for Windows and OS/2 Technical Reference,&quot; pages 103-107.
 * }

-

Last reviewed: July 30, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.