Programatically adding new autotext entries to a global template

G

Gavin

I'm in the process of (hopefully) improving the overall use of Word
XP in our small office. Being a self-taught newbie to VBA, I've found
this newsgroup to be of real value as a source of info and tips.

As part of the process, I've created a global template ( called
RI_Global.dot) which will hold, amongst other things, all our
generic autotext entries, ie - ones we want to be available all the
time in any document.

What I'm seeking guidance about concerns the way a new user-created
autotext entry is "saved" to a template. My understanding is that the
default choice is the normal.dot template, whereas I want the entry to
be saved into RI_Global.dot.

Is it possible to "force" a newly created AutoText entry to be saved
into RI_Global.dot, rather than relying on the users to remember to
choose this template when they access the Insert/AutoText/AutoText
command? Also, can I intercept the "Alt+F3" shortcut to again force the
entry to be saved to my global template?

I've found the appropriate(?) dialog which might be interceptable [ie:
Dialogs(wdDialogEditAutoText)], but I can't see how any of the options
can be manipulated through VBA. Using the macro recorder and selecting
the global template from the "Look in:" drop-down box doesn't shed any
light on the steps involved when I look at the resulting code.

Thanks in anticipation.
Regards,
Gavin
 
J

Jay Freedman

Hi Gavin,

Download Autotextloader from http://jay-freedman.info and look at the
code. You're welcome to adapt the code in any way. If that template
already does what you want, you're also welcome to just use it.
 

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