R
Russ
Jeffrey,
I did something similar on some templates recently. When a
new document is created in sub Autonew()
ActiveDocument.CustomDocumentProperties.Add
Name:="newdoc", LinkToContent:=False, _
Value:="Yes", Type:=msoPropertyTypeString
as the last line before End Sub.
In the Autoopen() sub, make your first line if
ActiveDocument.CustomDocumentProperties("newdoc") = "Yes"
then goto theend
This will ensure that if a user opens the document, the
custom property is 'Yes' and will automatically bypass all
code.
Hope this makes sense.
I did something similar on some templates recently. When a
new document is created in sub Autonew()
ActiveDocument.CustomDocumentProperties.Add
Name:="newdoc", LinkToContent:=False, _
Value:="Yes", Type:=msoPropertyTypeString
as the last line before End Sub.
In the Autoopen() sub, make your first line if
ActiveDocument.CustomDocumentProperties("newdoc") = "Yes"
then goto theend
This will ensure that if a user opens the document, the
custom property is 'Yes' and will automatically bypass all
code.
Hope this makes sense.