Article ID: 182097
Article Last Modified on 11/23/2006
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:
181058 OFF98: How to Run Sample Code from Knowledge Base Articles
163435 VBA: Programming Resources for Visual Basic for Applications
179216 OFF98: How to Use the Microsoft Office Installer Program
Additional query words: wordcon vb vba vbe
Keywords: kbdtacode kbhowto kbmacroexample KB182097