Charles
Fri Mar 31 17:01:50 CST 2006
If you have an open document,
ActiveDocument.AttachedTemplate.Saved
gives a boolean value, True or False
--
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.
"dlevine54" <dlevine54@discussions.microsoft.com> wrote in message
news:0E5C43DC-B1FE-445B-8A60-2282A0AFDAB4@microsoft.com...
> 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?
>
> "Greg" wrote:
>
>> 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
>>
>>