Object Model Reference : Classes : D : Document : Properties : Document.Dirty |
Property Dirty As Boolean
Member of Document
The Dirty property returns or specifies a value that determines whether the document was modified after it was last saved.
The following VBA example asks the user to save the document if the changes have not been saved, and then closes the document.
Sub Test() |
If ActiveDocument.Dirty Then |
If MsgBox("Document is modified. Save?", vbOKCancel) = vbCancel Then Exit Sub |
ActiveDocument.Save |
End If |
ActiveDocument.Close |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.