Run a macro when attaching a template

D

Dovbniak

I have a template where I need a macro to run every time a user attaches it
to an existing document.

Essentially I need the following to happen:
1. user opens an existin file
2. they access documents and templates
3. they click attach
4. they select the template to attach
5.when they click OK to return to the document, the macro runs.

I know I can use Auto Execute macros (autoopen, autonew, autoexec etc) but I
am stumped about this one.

the purpose of the macro is to display a custom ribbon bar tab I created in
the template. I would like the user to be taken automatically to the custom
tab.

any help would be greatly appreciated.
 
D

Doug Robbins - Word MVP

How about having a userform that has a combobox that gets populated with a
list of templates from which the user can select one and then when they
click on a command button in the userform that attachs the template and also
contains the code that you want to be run.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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