A template or a document based on a template?
In both cases the Document_Open event will be used, but if you want to
only run the event if it is a document and not the template itself then
what I do is to test the name of the ActiveDocument and if it has ".dot"
at the end I don't execute any more:
Again, watch out for the compile errors, if any.
Private Sub Document_Open()
if instr(1, ActiveDocument.Name, ".dot", vbCompareText) = 0 then
' Do processing here of the document.
end if
Ens sub
Regards
Malc
www.dragondrop.com