User Guide

ActiveDocument object 263
Clear
Syntax Clear();
Description Clears all text from the current document.
Close
Syntax Close(wbPromptToSave: WordBool): WordBool;
Description Boolean. Closes the current document. If wbPromptToSave is True, the user is
prompted to save any changes. Returns
True if the document was closed (that is, the
user didnt cancel saving changes).
Cursor
Syntax Cursor_ (wbSelect: WordBool);
Description Boolean. Positions the cursor. If wbSelect is True, then the current selection is
extended to the new cursor position.
The following values are allowed:
CursorLeft, CursorRight, CursorWordLeft, CursorWordRight, CursorDown,
CursorUp, CursorPageDown, CursorPageUp, CursorDocStart, CursorDocEnd,
CursorLineStart, CursorLine End.
Example function Main(){
with (Application){
// Select the entire line
ActiveDocument.CursorLineStart(false);
ActiveDocument.CursorLineEnd(true);
}
}
EndUpdate
Syntax EndUpdate();
Description Turns on screen updating for the current document.
Example
function Main(){
var iTags = 0;
with (Application){
ActiveDocument.BeginUpdate();
ActiveDocument.CursorDocStart(false);
try{
while (ActiveDocument.GotoNextStartTag(false)){
iTags++;
}