258
Chapter 15 Scripting the Visual Tools Object Model
ActiveDocument object
Use the
ActiveDocument
object to refer to the document currently displayed in the
Editor. To access an open document that is not active, use the
Application.DocumentCache
object.
Properties
CanRedo
Syntax
CanRedo: WordBool (read-only)
Description
Boolean. Returns
True
if changes can be re-done.
Example
function Main() {
var sMessage;
sMessage = "CanRedo : ";
with (Application) {
If(ActiveDocument.CanRedo)
sMessage = sM "Yes";
Else
sMessage = sM "No";
MessageBox(sMessage, VersionText, 0);
}
}
CanUndo
Syntax
CanUndo: WordBool (read-only)
Description
Boolean. Returns
True
if changes can be undone.
Example
function Main() {
var sMessage;
sMessage = "CanUndo : ";
with (Application) {
If(ActiveDocument.CanUndo)
sMessage = sM "Yes";
Else
sMessage = sM "No";
MessageBox(sMessage, VersionText, 0);
}
}
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...