How to share macros on a network?

D

damezumari

I have written a macro AddAutoFooterMenu that adds a button called
AutoFooter to the Tools menu. When the button is checked, a footer with
date, time, filename, and path is automatically created when you save a
document thanks to a set of macros.

When the button is unchecked, no footer is created when documents are
saved.

How do I make the macros available to 200 users on a network? How do I
get the macro AddAutoFooterMenu to run once on every machine?

The computers are all Win2000 or WinXP. I use Word 2003.

I am grateful for your help!

Regards,

Jan Nordgreen
 
C

Charles Kenyon

Create a template that holds the AutoFooter button code.
Add the button (manually or using code) to the Tools menu making sure that
the changes are stored in your template rather than normal.dot.
Since your button's code almost certainly changes the user interface make
sure that the changes made by the code are stored in your template rather
than normal.dot. At the end of the code, change the template's saved status
to true.

Look into AutoText. You can save your footer as an AutoText entry and make
it available on the header/footer toolbar and skip the macro all together or
use your macro to insert the AutoText entry. (AutoText entries are easier
for me to edit than is code that inserts individual components.)

Save your template.

Distribute it to your users to go in the users' Word Startup folder. See
scenario 2 in http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm. 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.
--

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.


Another tack would be to create document templates to share that already
have the footer you want. It is rare for me to start a document from "Blank
document." I use such documents as scratch pads. Most work is done from
templates.
--
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.
 
D

damezumari

Thanks for your reply.

I have put the AutoFooter.dot in the startup folder.

The code in it includes AutoNew and AutoOpen subs. They do NOT fire
when I create a new document or open an old one.

How can I get them to fire?

Regards,

Jan Nordgreen
 
J

Jonathan West

damezumari said:
Thanks for your reply.

I have put the AutoFooter.dot in the startup folder.

The code in it includes AutoNew and AutoOpen subs. They do NOT fire
when I create a new document or open an old one.

How can I get them to fire?

How to create global event procedures similar to AutoOpen, AutoNew and
AutoClose, without using Normal.dot
http://www.word.mvps.org/FAQs/MacrosVBA/PseudoAutoMacros.htm

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
C

Charles Kenyon

See http://word.mvps.org/FAQs/MacrosVBA/PseudoAutoMacros.htm.

Be very careful of your customization context in your macros. Unless you set
it to being your template, your Add-In will become a very real nuisance,
similar in local behavior to a virus. You may want to look at the recent
thread with someone who was very upset because normal.dot kept bloating when
his code was constantly making changes to normal.dot.

The subject of the thread was "Normal.dot File increases (VBA Code)" and it
started on October 25 (I think).


--
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.
 
D

David

We have a similar situation but I put the template, in your case
autofooter.dot, on a network drive accessible to all users and then created a
Windows Shortcut in each user's Word\startup directory to point to the
template. That way, if I want to make any changes, they only need to be
changed in one place. In fact, we have a huge Standard.Dot template that has
many, many shared macros and autotext entries that everyone can access very
easily.

- David
 
J

Jonathan West

David said:
We have a similar situation but I put the template, in your case
autofooter.dot, on a network drive accessible to all users and then
created a
Windows Shortcut in each user's Word\startup directory to point to the
template. That way, if I want to make any changes, they only need to be
changed in one place. In fact, we have a huge Standard.Dot template that
has
many, many shared macros and autotext entries that everyone can access
very
easily.

I wouldn't advise that approach for a variety of reasons.

1. You're vulnerable to a single-point failure - of the server, of the link
to the server etc. Some activities *must* have the network, but
word-processing isn't one of them. Make it as robust as possible.

3. Shared access to a network drive generally offers lower performance than
the use of a local drive with a good cache.

3. You're loading the network with avoidable traffic, potentially slowing
other activities that are using the network.

4. Laptops and other machines that are sometimes disconnected need a
different setup. You'll need to put the templates on the local disk, and
remember to update them individually when you replace the main copy of the
template

5. You'll have to break everyone's lock on the file if you want to update
it - somebody is sure to have left their PC on overnight.

6. Just occasionally, I have seen weird errors that seem to be traceable to
the fact that a file has been opened by two different users.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
C

Charles Kenyon

Yes, and no.
If you do this, you cannot make any changes when anyone else has Word open.
They will lock the file.
If instead you have the user's login script update their local copy, you are
free to make changes which get updated next time a user logs in.
--
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