Using Special Reserved Bookmarks in WordBasicLast reviewed: July 30, 1997Article ID: Q69496 |
The information in this article applies to:
SUMMARYThere are several reserved bookmarks that can be set and automatically updated in Word for Windows using the WordBASIC macro language.
MORE INFORMATIONBookmarks 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 "Microsoft Word for Windows and OS/2 Technical Reference." 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 MainWhile CmpBookmarks ("\Sel", "\EndOfDoc") . . . Wend End SubThis 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): "Using WordBasic," by WexTech Systems and Microsoft, pages 88-90. "Microsoft Word for Windows and OS/2 Technical Reference," pages 103-107.
|
KBCategory: kbmacro
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |