IsTemplateDirty()

Syntax

IsTemplateDirty()

Remarks

Returns a value indicating whether the active template has changed since it was last saved (that is, if it is "dirty"). Whether a template is dirty determines if Word displays a prompt to save changes when the template is closed.

Value

Explanation

0 (zero)

If the template has not changed since it was last saved

–1

If the template has changed since it was last saved


Example

This example saves the active template if there are unsaved changes:


If IsTemplateDirty() = -1 Then SaveTemplate

See Also

IsDocumentDirty, SaveTemplate, SetDocumentDirty(), SetTemplateDirty