Previous Document Next Document

Object Model Reference : Classes : D : Document : Properties : Document.Dirty


Document.Dirty

Property Dirty As Boolean

Description

Member of Document

The Dirty property returns or specifies a value that determines whether the document was modified after it was last saved.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.