Article ID: 175924
Article Last Modified on 1/22/2007
Sub IsTemplate()
' Use the FileSaveAs dialog to determine the typ of document.
With Dialogs(wdDialogFileSaveAs)
' Execute the dialog but do not display the dialog.
.Execute
If .Format = 1 Then
MsgBox "Template"
Else
MsgBox "Not a template"
End If
End With
End Sub
For additional information, please see the following article in the
Microsoft Knowledge Base:
173707 OFF97: How to Run Sample Code from Knowledge Base Articles
163435 VBA: Programming Resources for Visual Basic for Applications
120802 Office: How to Add/Remove a Single Office Program or Component
Additional query words: wordcon vb vba vbe
Keywords: kbdtacode kbhowto kbmacroexample KB175924