Call a VBA Subroutine from a separate template

D

Derek

I want to call and execute a macro that resides in a different template.
For example ...
I'm working in MyDocument.doc and want to call the macro "InsertCompanyLogo"
from a template called "CompanyTemplate.dot".
What code should I use?
Please help. I'm stuck.
Derek
 
D

Doug Robbins - Word MVP

Easiest thing is to put the template that contains the macros that you want
to use into the Word\STARTUP folder so that it becomes an Addin. Then the
macros that are contained in it will be available from all documents.
--
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
 
C

Charles Kenyon

And, if you do this, the syntax is:
Application.Run MacroName:="MyMacro"
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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