Syntax
SetTemplateDirty [Dirty]
Remarks
Controls whether Word recognizes a template as "dirty" — that is, changed since the last time the template was saved. When a dirty template is closed, Word displays a prompt asking if changes should be saved.
If you change a template and then set Dirty to 0 (zero), Word recognizes the template as unchanged, or "clean." When you close the template, Word neither displays a prompt nor saves changes.
Argument | Explanation |
Dirty | Specifies whether to make the active template dirty: 0 (zero) The template is treated as clean. 1 or omitted The template is recognized as dirty. |
Example
This example makes a temporary change in the active template's keyboard assignments (assigns the SmallCaps command to ctrl+shift+c (Windows) or COMMAND+SHIFT+C (Macintosh)) and then makes the template clean. When the template is closed, Word does not display a prompt or save changes.
ToolsCustomizeKeyboard .KeyCode = 835, .Context = 1, \ .Name = "SmallCaps", .Add SetTemplateDirty 0
See Also
IsDocumentDirty(), IsTemplateDirty(), SetDocumentDirty