User Guide
ActiveDocument Object 233
MessageBox(sMessage, VersionText, 0);
}
}
ReadOnly
Syntax ReadOnly: WordBool (read-only)
Description Boolean. Returns True if the active document is read-only.
Example function Main(){
with (Application){
if (ActiveDocument.ReadOnly){
MessageBox(’Current document is Read-Only’, ’Information’, 0);
}
}
}
SelStart
Syntax SelStart: integer
Description Gets and sets the start of the current selection.
Example
function Main(){
with (Application){
with (ActiveDocument){
// Select entire document
SelStart = 0;
CursorDocEnd(true);
}
}
}
SelLength
Syntax SelLength: integer
Description Gets and sets the length of the current selection.
Example
function Main() {
var sMessage;
sMessage = "The length of the selected text of your document is ";
with (Application) {
sMessage = sMessage + ActiveDocument.SelLength;
MessageBox(sMessage, VersionText, 0);
}
}