User Guide

202 Chapter 14 Scripting the Visual Tools Object Model
DocumentCount
Syntax DocumentCount: integer (read-only)
Description Number of open documents.
Example
function Main() {
Var sMessage;
with (Application){
sMessage = "There are ";
sMessage = sMessage + sDocumentCount + " open.\n";
// Get the number of open documents.
sMessage = sMessage + sDocumentIndex + ".\n";
// Get the index of the current document.
}
}
DocumentIndex
Syntax DocumentIndex: Integer
Description Tab index of current document.
Example
function Main() {
Var sMessage;
with (Application){
sMessage = "There are ";
sMessage = sMessage + sDocumentCount + " open.\n";
// Get the number of open documents.
sMessage = sMessage + sDocumentIndex + ".\n";
// Get the index of the current document.
}
}
ExeName
Syntax ExeName: OleString (read-only)
Description File name of application executable, including path.
Example function Main() {
Var sExeName;
with (Application){
sExeName = ExeName; // Store the path in a variable
}
}