I have a number of templates where each might require the samer
autotext entry. I have, therefore, placed this entry in the autotext
collection of my global template (myGlobalTemplate.dot)

When I'm in a document attached to a document template I now want to
be able to retrieve an autotext entry from the global template.

I can see how this could be done if the entry was in the Normal.dot
template autotext collection as well as in the attached template. But
I cannot see or find a way of placing an autotext located in the
global template into the active document which is attached to a
document template other than Normal. (...if you see what I mean!)

Perhaps someone might ask why don't I place the same autotext entry
into each relevant template (eight of them) and then use the
AttachedActiveDocument.AttachedTemplate.AutoTextEntries("one").Insert?

Well, if my little scheme above cannot be done then I think I might
have to resort to that step. It would always be easier to amend one
autotext entry than eight of them.

Regards

Roderick

Re: AutoText entries in Global template by Anne

Anne
Thu May 26 12:27:26 CDT 2005

Roderick,

I understand completely why you do it this way. I also do the same. There
is no sense having the same autotext in 5 different templates.

Here is how to do it:

Templates(Application.Options.DefaultFilePath(wdStartupPath) &
"\myGlobalTemplate.dot") _
.AutoTextEntries("nameofautotext").Insert Selection.Range, RichText:=True

Anne P.
"Roderick O'Regan" <rory@removethis.theoregans.com> wrote in message
news:5cqb91l5pifksd65235io4qajkdbac238u@4ax.com...
>I have a number of templates where each might require the samer
> autotext entry. I have, therefore, placed this entry in the autotext
> collection of my global template (myGlobalTemplate.dot)
>
> When I'm in a document attached to a document template I now want to
> be able to retrieve an autotext entry from the global template.
>
> I can see how this could be done if the entry was in the Normal.dot
> template autotext collection as well as in the attached template. But
> I cannot see or find a way of placing an autotext located in the
> global template into the active document which is attached to a
> document template other than Normal. (...if you see what I mean!)
>
> Perhaps someone might ask why don't I place the same autotext entry
> into each relevant template (eight of them) and then use the
> AttachedActiveDocument.AttachedTemplate.AutoTextEntries("one").Insert?
>
> Well, if my little scheme above cannot be done then I think I might
> have to resort to that step. It would always be easier to amend one
> autotext entry than eight of them.
>
> Regards
>
> Roderick



Re: AutoText entries in Global template by Tom

Tom
Tue May 31 09:19:50 CDT 2005

Global Templates are a member of the Templates collection. So do this, more
or less:

Application.Templates("C:\Program Files\Microsoft
Office\Office\STARTUP\myGlobalTemplate.dot").AutoTextEntries("NameOfEntry).Insert
oRange

--
Tom Winter
tom@nospam.amosfivesix.com


"Roderick O'Regan" <rory@removethis.theoregans.com> wrote in message
news:5cqb91l5pifksd65235io4qajkdbac238u@4ax.com...
>I have a number of templates where each might require the samer
> autotext entry. I have, therefore, placed this entry in the autotext
> collection of my global template (myGlobalTemplate.dot)
>
> When I'm in a document attached to a document template I now want to
> be able to retrieve an autotext entry from the global template.
>
> I can see how this could be done if the entry was in the Normal.dot
> template autotext collection as well as in the attached template. But
> I cannot see or find a way of placing an autotext located in the
> global template into the active document which is attached to a
> document template other than Normal. (...if you see what I mean!)
>
> Perhaps someone might ask why don't I place the same autotext entry
> into each relevant template (eight of them) and then use the
> AttachedActiveDocument.AttachedTemplate.AutoTextEntries("one").Insert?
>
> Well, if my little scheme above cannot be done then I think I might
> have to resort to that step. It would always be easier to amend one
> autotext entry than eight of them.
>
> Regards
>
> Roderick