Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

Global Templates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob S - 03 Apr 2005 05:56 GMT
I use Office 2003 and am new at MS Word macros. As I was starting to create
a few macros that I would want to use for some time, I was advised to put
them into a special global template for safe keeping in case I had to start
over with a clean normal.dot. Although this still sounds like good advice,
it along with a few other things have me a little confused. If someone can
answer the following few questions, I think it will clear up my confusion.

When I click Alt F8 (Macros) and click the dropdown arrow for "Macros in", I
see 3 options, namely Normal.dot, Bob1-Global.dot (Global template), and
Bob1-Global.dot (Template). The first one (Normal.dot) has 3 macros in it.
The other 2 templates have not only almost the same name, but also the same
3 macros in them. The difference is that if I am viewing them in the Global
Template, they are NOT editable.

Here are the questions.

1. Why do there appear to be 2 templates called Bob1-Global.dot (one
referred to as a global template and the other simply as a template)?

2. Is the advice I received earlier (to put my macros into a specialized
global template (rather than the normal.dot (for safe keeping) good advice?

3. How can I move macros from one template to another?

Thank you for your help.

Bob
Jezebel - 03 Apr 2005 06:47 GMT
The 'macros in' lists a) normal.dot, b) the template for the active document
if not normal.dot, and c) any add-ins (global templates). These last are
templates in Word's start-up folder, which should not be the same as your
templates folder. Add-ins are not intended for creating documents from,
although they could be used for that -- which might be what's going on in
your case, hence the duplicate listing.

You can't view the code in an add-in unless you open the add-in explicitly,
using File > Open; but you can still run the code.

Yes, putting the code in a separate template is good advice. Normal.dot has
a lot of work to do anyway, and tends to crash if you put much code in it
and modify that code a lot. And if you want to distribute your code to
others, it's much simpler. It's considered very ill-mannered to screw around
with other people's normal.dot.

To move macros between templates: you can drag the modules in the project
explorer window. Or right-click the module and select export -- this saves
the module as a plain text file. Then right-click the target template,
select import, select the file you previously exported.

> I use Office 2003 and am new at MS Word macros. As I was starting to
> create a few macros that I would want to use for some time, I was advised
[quoted text clipped - 25 lines]
>
> Bob
Charles Kenyon - 03 Apr 2005 07:27 GMT
Following up on Jezebel's remarks, you can edit and access macros in a
global template in the vba editor _if you open the global template._ This is
different from having it loaded as an Add-In, it means that the template is
open on the screen and you could print it (although many Add-ins have little
or no text). See http://addbalance.com/word/movetotemplate.htm for
step-by-step instructions on moving / sharing / copying / backing-up
customizations including AutoText, AutoCorrect, keyboard assignments,
toolbars, macros, etc.
Signature


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://www.mvps.org/word 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.

>
> I use Office 2003 and am new at MS Word macros. As I was starting to
[quoted text clipped - 26 lines]
>
> Bob
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.