User Guide

Application Object 207
BrowseText
Syntax BrowseText(sText, BaseHREF: OleVariant);
Description Displays the passed text in the internal browser. Use the BaseHREF parameter to
interpret relative paths. For local files,
BaseHREF is the folder that contains the file.
Example function Main() {
Var sMessage;
sMessage = "You are viewing this text in the browse mode of your ";
sMessage = sMessage + VersionText;
with (Application){
BrowseText (sMessage);
}
}
CloseAll
Syntax CloseAll(wbPromptToSave: WordBool): WordBool;
Description Closes all open documents. If wbPromptToSave is True, the user is prompted to save
any changes. Returns
True if successful, that is, the user didnt cancel if
wbPromptToSave is True.
Example
function Main() {
with (Application){
CloseAll();
}
}
ExecCommand
Syntax ExecCommand(nCmdID: integer, nOptions: integer);
Description Boolean. Execute a specific command based on its CommandID. For available
commands, see “Table of CommandID Values” on page 282. Use
nOptions with
cursor movement commands to determine whether text is selected during cursor
movement (nOptions = 1) or unselected (nOptions = 0). For all other commands,
pass
nOptions = 0.
Example
function Main() {
with (Application){
ExecCommand(3); // Executes an Open File command.
}
}