Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Derek
 
Posts: n/a
Default Call a VBA Subroutine from a separate template

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
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP
 
Posts: n/a
Default Call a VBA Subroutine from a separate template

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

"Derek" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.word.tables
Charles Kenyon
 
Posts: n/a
Default Call a VBA Subroutine from a separate template

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
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.

"Doug Robbins - Word MVP" wrote in message
...
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

"Derek" wrote in message
...
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





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global/Master Template [email protected] New Users 1 October 27th 05 03:34 PM
Very long time to call up a template Josper Microsoft Word Help 0 September 7th 05 01:20 AM
Convert to Symbols Omar Menjivar Microsoft Word Help 7 June 27th 05 07:32 PM
Anyone have a good MS Word template to summarize a sales call TPatts Microsoft Word Help 1 June 25th 05 11:06 AM
CPU Usage When Working with Templates you created KM1 Microsoft Word Help 3 May 21st 05 11:57 PM


All times are GMT +1. The time now is 06:16 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"