AutoText entries in Global template

R

Roderick O'Regan

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
 
A

Anne P.

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.
 
T

Tom Winter

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top