Document.Type (Word)

Returns the document type (template or document). Possible return values are wdTypeDocument - Document, wdTypeFrameset - Frameset, wdTypeTemplate - Template.


If ActiveDocument.ActiveWindow.Type = wdWindowDocument Then 
 ActiveDocument.Styles("Heading 1") _ 
 .ParagraphFormat.Alignment = wdAlignParagraphCenter 
End If