Syntax
StartOfDocument [Select]
StartOfDocument([Select])
Remarks
The StartOfDocument statement moves the insertion point or, if Select is nonzero, the active end of the selection (the end that moves when you press CTRL+SHIFT+HOME (Windows) or COMMAND+SHIFT+HOME (Macintosh)) to the beginning of the document.
The StartOfDocument() function behaves the same as the statement and also returns one of the following values.
Value | Explanation |
0 (zero) | If the insertion point or the active end of the selection was not moved (for example, if it was already at the start of the document) |
–1 | If the insertion point or the active end of the selection was moved |
Example
This example moves the insertion point to the start of the document and then prepares Word to begin a replace operation:
StartOfDocument EditFindClearFormatting EditReplaceClearFormatting 'Instructions that perform a replace operation go here
See Also
AtStartOfDocument(), EndOfDocument