Load add-in with Template

R

RobinK

I'm using Word 2007. Like many others, I created several templates in 2003
with customized toolbars. I know how to get the toolbars to show up via the
add-in tab. The problem is that my templates are stored on a server where
several users have access to them.

When the user creates a new document based from the template, the toolbar
add-in doesn't automatically load.

My guess is that the each user's start-up folder points to the default
location. Is there a macro that can either be run when a new document is
created from the template or when an existing document is opened based on the
template that loads the add-in? I know I could go around to each user's
computer and manually add it, but what a pain to keep up on.

Hope this makes sense and any help is appreciated.
Thanks!
Robin
 
R

RobinK

I figured it out! In my template, I used the following code on the "new" and
"open" events:

Private Sub Document_New()
AddIns.Add ("c:\my documents\my template.dot")
End Sub

I also added this code on the close event as I only want this toolbar
available for this template:

Private Sub Document_Close()
AddIns.Unload True
End Sub

It works great!
 

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