Macros in global templates - single or collections?

R

R

I have a growing collection of macros that I wish to make available when I
launch Word.

I can make a separate ".dot" file in Word's Startup folder for each one
Or
I can put several into a single ".dot" file in that folder

Is there any difference in action taken on Word launch?

Are there any advantages/disadvantages to either policy?
 
B

Beth Rosengard

You may find the following article by J.E. McGimpsey helpful:
<http://www.mcgimpsey.com/macoffice/word/globaltemplate.html>

It doesn't answer your specific question although I deduce that J.E. puts
most, if not all, of his macros in a single global template. In any case,
he'll probably be here before long to answer your question himself.

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/MacWordNew/index.htm>
(If using Safari, hit Refresh once or twice ­ or use another browser.)
Entourage Help Page: <http://www.entourage.mvps.org>
 
D

Daiya Mitchell

A single global template is fine. It doesn't make any difference to
functionality. As Beth said, JE may have some more expert comments.

Having too many global templates could conceivably slow down your Word
launch. I put all my macros in the same template--I might have two
templates, for some reason, but one per macro is certainly not necessary and
would be a very unusual thing to do.

The only thing I can think of that it will make a difference to is the ease
of extracting the macros later, if necessary. If you are trying to move
macros among templates by using the Organizer instead of copying and pasting
the actual macro text, the Organizer does not list individual macros but
only the module they are stored in (templates can have multiple modules).
But this would matter more for Normal template, in case it corrupted--global
templates don't usually corrupt, so you don't need to recover your macros
from them with the Organizer. (if this makes no sense to you, don't worry
about it. It doesn't matter to functionality, and there are only a few
situations I can imagine for a home user where this would come into play,
and even then I don't think it would save a noticeable amount of time).
 
J

JE McGimpsey

R said:
I have a growing collection of macros that I wish to make available when I
launch Word.

I can make a separate ".dot" file in Word's Startup folder for each one
Or
I can put several into a single ".dot" file in that folder

Is there any difference in action taken on Word launch?

Are there any advantages/disadvantages to either policy?

Once you have the macros debugged, I can't think of any real advantages
to putting each macro in a separate templates. Loading the files takes
about the same time, with a single file being slightly more efficient.
Note that each additional file takes overhead resources, so if you don't
have a lot of RAM, it could reduce your performance.

That said, I have several global templates (add-ins) that I use, with
macros grouped by function:

1) My startup add-in, which hides/disables all the built-in toolbars and
menus, and creates my custom replacements. It also contains macros that
set all my preferences, set keyboard shortcuts, substitute for built-in
commands (e.g., setting Window/Arrange All to tile vertically rather
than horizontally), load and unload my Work menu, and a few macros that
implement styles. There's also a macro that sets toolbars, menus,
keyboard shortcuts and preferences back to defaults so that I can quit
and load a stock configuration.

2) A "workbar" add-in, which builds and has macros for my most common
utility macros, such as toggling full path in the caption, cycling
header and numbering levels, resizing windows, setting zoom, showing
document statistics, entering date/time fields in my preferred format,
pasting in my signature, etc.

3) A VB6 replacement add-in, containing VBA5 equivalents for VBA6
functions (e.g., Split, Join, Replace, StrReverse). That way I can code
for VBA6, and simply use a reference to the add-in for Mac versions.

4) An add-in containing about 50 other macros, including ones that do
complex formatting, clean up emails, do file manipulation, generate
labels and form letters, create reports, create complex tables, etc.

I use modules liberally, since you can transfer modules, not individual
macros/procedures using the Organizer. That way if I need to send a
macro to a client, I can grab the module I want and transfer it to a new
template/add-in.

I debug all new macros in a clean document or template, just for ease of
use - that way I can load a clean copy of Word with only my macro, test
it, then try adding the other add-ins.

I never store anything in Normal, since I have an AppleScript that
trashes the Normal template every time I log in, to reduce the
possibility of corruption.
 
R

R

Many thanks to Beth, Daiya and JE for some very clear and helpful comments.

One template it is to be. (maybe later on it can be a few if quantity and
diversity of function leads me that way.)


R said:
I have a growing collection of macros that I wish to make available when I
launch Word.

I can make a separate ".dot" file in Word's Startup folder for each one
Or
I can put several into a single ".dot" file in that folder

Is there any difference in action taken on Word launch?

Are there any advantages/disadvantages to either policy?

Once you have the macros debugged, I can't think of any real advantages
to putting each macro in a separate templates. Loading the files takes
about the same time, with a single file being slightly more efficient.
Note that each additional file takes overhead resources, so if you don't
have a lot of RAM, it could reduce your performance.

[snip some really useful stuff]
 
J

John McGhie [MVP - Word and Word Macintosh]

Yeah: I use single templates.

Generally, I avoid global templates, because as J.E. mentions they do hog a
bit of memory. I work on long, complex documents, so every little bit
helps.

I always use Attached Templates. Templates attached to documents do not
load at all unless the document is loaded, and unload when the document is
closed, releasing the memory used.

I also use a single template file, because many of my macros call other
macros, and calling across multiple template files is a PITA. The code to
do so is complex, handling cross-platform issues is a pain, handling
template storage location differences is complex, and the performance of
calls across multiple templates can be very poor.

However, Global Templates are a great idea for users who do not understand
templates at all: I am using them in a project at the office currently so I
do not have to patiently explain to the users how to attach their templates.

On the other hand, I put a lot of macros, toolbars, etc in my Normal
template. Basically, that's what it's for: it's a kind of "Super Global
Template" which is always going to load, so it might as well make itself
useful.

Just remember to back Normal up, because it gets constant traffic that will
corrupt it over time. That said, it's been a few years now since I last
lost one... Which is probably because I replace mine with a new version
every few weeks or months.

Hope this helps


Many thanks to Beth, Daiya and JE for some very clear and helpful comments.

One template it is to be. (maybe later on it can be a few if quantity and
diversity of function leads me that way.)


R said:
I have a growing collection of macros that I wish to make available when I
launch Word.

I can make a separate ".dot" file in Word's Startup folder for each one
Or
I can put several into a single ".dot" file in that folder

Is there any difference in action taken on Word launch?

Are there any advantages/disadvantages to either policy?

Once you have the macros debugged, I can't think of any real advantages
to putting each macro in a separate templates. Loading the files takes
about the same time, with a single file being slightly more efficient.
Note that each additional file takes overhead resources, so if you don't
have a lot of RAM, it could reduce your performance.

[snip some really useful stuff]

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 

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