I don't either. It might be considered living dangerously, but if you
feel confident that nothing of consequence is changing in your template
you might try something like:
Sub Test()
Dim oState As String
'Get state at start
oState = ActiveDocument.AttachedTemplate.Saved
'Substitute the next three lines with your current code that is some
how changing
'the template
NormalTemplate.AutoTextEntries.Add Name:="Blue", _
Range:=Selection.Range
MsgBox ActiveDocument.AttachedTemplate.Saved
'Set state to start state
ActiveDocument.AttachedTemplate.Saved = oState
End Sub
Greg, I tried your suggestion but ' ActiveDocument.AttachedTemplate.Saved' is
not avialable in my code. That line throws an error. The only function
'ActiveDocument.AttachedTemplate' has is getType. What am I missing?
> I don't either. It might be considered living dangerously, but if you
> feel confident that nothing of consequence is changing in your template
[quoted text clipped - 13 lines]
> ActiveDocument.AttachedTemplate.Saved = oState
> End Sub
Charles Kenyon - 01 Apr 2006 00:01 GMT
If you have an open document,
ActiveDocument.AttachedTemplate.Saved
gives a boolean value, True or False

Signature
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
> Greg, I tried your suggestion but ' ActiveDocument.AttachedTemplate.Saved'
> is
[quoted text clipped - 18 lines]
>> ActiveDocument.AttachedTemplate.Saved = oState
>> End Sub