262
Chapter 15 Scripting the Visual Tools Object Model
SelText
Syntax
SelText: OleString
Description
Gets and sets the text in the current selection.
Example
function Main() {
var sMessage;
sMessage = "The length of the selected text of your document is ";
with (Application) {
sMessage = sM ActiveDocument.SelText;
MessageBox(sMessage, VersionText, 0);
}
}
TabIndex
Syntax
TabIndex
Description
Gets and sets the tab index of the document tab.
Example
function Main(){
with (Application){
if (ActiveDocument.TabIndex != 0){
DocumentIndex = 0;
}
}
}
Text
Syntax
Text: OleString
Description
Gets and sets the complete document text.
Methods
BeginUpdate
Syntax
BeginUpdate();
Description
Turns off screen updating for the current document. This is useful if your script
needs to make several changes to the current document at once—turning off screen
updating during the procedure might significantly speed up the process. To turn on
updating again, use
EndUpdate
.
Use
BeginUpdate...EndUpdate
with caution. If you fail to call
EndUpdate
after a call
to
BeginUpdate
, or if the script crashes before
EndUpdate
is called, the user cannot
view any changes made in the Editor.
Summary of Contents for HOMESITE
Page 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...
Page 12: ...xii Contents...
Page 20: ...xx About This Book...
Page 28: ...8 Chapter 1 Setting Up the Product...
Page 70: ...50 Chapter 4 Managing Files...
Page 88: ...68 Chapter 5 Writing Code and Web Content...
Page 116: ...96 Chapter 6 Editing Pages...
Page 148: ...128 Chapter 7 Using Web Development Languages...
Page 190: ...170 Chapter 11 Deploying Files...
Page 210: ...190 Chapter 12 Testing and Maintaining Web Pages...
Page 216: ...196 Chapter 13 Extending the Help System...
Page 350: ...330 Glossary...
Page 358: ...338 Index...