Dirty Property
Indicates whether the active document has unsaved changes. Read-only Boolean.
expression.Dirty
*expression * Required. An expression that returns a Document object.
Example
The following example saves the active document if the document has unsaved changes.
Sub TestDirty()
If miDoc.Dirty Then
miDoc.Save
End If
End Sub
Applies to | Document Object