User Guide
ActiveDocument Object 235
Clear
Syntax Clear();
Description Clears all text from the active document.
Close
Syntax Close(wbPromptToSave: WordBool): WordBool;
Description Boolean. Closes the active document. If wbPromptToSave is True, the user is
prompted to save any changes. Returns
True if the document was closed (that is, the
user didn’t 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 active document.
Example
function Main(){
var iTags = 0;
with (Application){
ActiveDocument.BeginUpdate();
ActiveDocument.CursorDocStart(false);
try{
while (ActiveDocument.GotoNextStartTag(false)){
iTags++;
}