Macros seperate from doc?

P

Paul

Hello again!

Is there a way to keep a bunch of sets of macros that all
can go with one document and bind them together
programatically as needed? Thanks!

-Paul
 
C

Charles Kenyon

I keep them in a module called "Resources" in Normal.dot. They are marked as
Private Subs so as to not be generally available on my macro list. When I
copy one from normal.dot into a template I delete the private. Normally
macros are kept in templates rather than documents and used for document
preparation. That way when you send one to someone, it won't set off alarms.

You can export modules to text files which can then be imported into other
templates or documents.

All of this is done in the visual basic explorer.
--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

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

See also the MVP FAQ: <URL: 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.
 
R

RWN

Charles;
I do pretty much the same thing but my experience with keeping things in
Normal.dot has not been a good one in that if Word has trouble with the
template it spontaneously creates a new one. In most cases, not being
close to an "expert", I could never figure out what exactly caused the
corruption but it was enough to make me quit using Normal.dot.
 
C

Charles Kenyon

I share your feelings about normal.dot. I maintain exported (text) copies of
my macros as well as backups of normal.dot. About the only think I keep in
normal.dot are these resource macros to be copied into other projects.
That's because normal.dot is normally the only one of my 15 or so global
templates that I can access the code in without opening the template. So,
when I come up with or find a good way to handle something, I put it in my
parts box. I don't think anyone can figure out what makes normal.dot go bad.
It is sort of like hard drives ... its not a question of if ... just when!
That said, it has been years since I've had normal.dot be zapped. I suspect
my changing practices to not keep my AutoText, toolbars, or working macros
in normal.dot may have something to do with that.


--

Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://addbalance.com/word/index.htm>

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

See also the MVP FAQ: <URL: 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.
 

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