Distributing Word Macros

W

Will Nelson

Thanks in advance

I've developed and tested macros which reside in my normal.dot

I need to distribute the macros to a number of sites. I think I want to create a different .dot file (opinions may vary)

Questions are

1> How do I create the .dot file containing only the relevant code and forms
2> How do I make the code invisible to the end-user, i.e. I don't want them to be able to "borrow" the code in the end-user's own macros
3> What is the best way to accomplish the preceding and distribute updates

Any reference to a detailed resource describing deployment is gratefully received

Thanks again.
 
J

Jezebel

Simplest is to distribute an add-in template.

1. Move the code and forms from normal.dot to a new template. Use the VBE
project explorer to export the modules from normal.dot and import them into
your new template.

2. To protect the code, in VBE go to Toole > Properties, and select
Protection tab, and enter a password.

3. To install the add-in, save the template to the Word Start-up folder (use
Tools > Options > File locations to find what folder Word is using).
Installation is simple if you can ask your users to save the template to
that location; but tricky to automate.



Will Nelson said:
Thanks in advance.

I've developed and tested macros which reside in my normal.dot.

I need to distribute the macros to a number of sites. I think I want to
create a different .dot file (opinions may vary).
Questions are:

1> How do I create the .dot file containing only the relevant code and forms?
2> How do I make the code invisible to the end-user, i.e. I don't want
them to be able to "borrow" the code in the end-user's own macros?
 
W

Will Nelson

Ms. Jezebel:

Thank you for your rapid response.

Sorry to be thick-headed dolt, but how do I start the VBE Project Explorer? Do you mean type ctrl-R while in the IDE entered via Microsoft Word > Alt-F8 etc.? If so, I'm there. Then what?

Or do I start VBEPX elsewise?

Thanks again for your time.

WN
 
J

Jezebel

Yes, exactly that: ctrl-R in the IDE (it's normally displayed
automatically). Right-click on the module, select Export File from the popup
menu.




Will Nelson said:
Ms. Jezebel:

Thank you for your rapid response.

Sorry to be thick-headed dolt, but how do I start the VBE Project
Explorer? Do you mean type ctrl-R while in the IDE entered via Microsoft
Word > Alt-F8 etc.? If so, I'm there. Then what?
 
W

Will Nelson

Ms. J

Thanks for hanging in there

OK. I export the files to a temporary directory. I have no clue how to create the repository for the import. Menu browsing renders me useless

Thanks again

W
 
J

Jezebel

Open your target template as a document (ie open in the main Word window).
It will appear in the Project Explorer list. Right-click. Select Import
file.


Will Nelson said:
Ms. J:

Thanks for hanging in there.

OK. I export the files to a temporary directory. I have no clue how to
create the repository for the import. Menu browsing renders me useless.
 
J

Jonathan West

Hi Will

This article should be of assistance

Distributing macros to other users
http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm


--
Regards
Jonathan West - Word MVP
http://www.multilinker.com
Please reply to the newsgroup

Will Nelson said:
Thanks in advance.

I've developed and tested macros which reside in my normal.dot.

I need to distribute the macros to a number of sites. I think I want to
create a different .dot file (opinions may vary).
Questions are:

1> How do I create the .dot file containing only the relevant code and forms?
2> How do I make the code invisible to the end-user, i.e. I don't want
them to be able to "borrow" the code in the end-user's own macros?
 
C

Charles Kenyon

I doubt that opinions will vary among experienced users. You do want to
create a different .dot file. This would be used as an Add-In, a secondary
global template. This is done by putting it in the user's Word Startup
folder.

Responding to your numbered questions:

1> How do I create the .dot file containing only the relevant code and
forms?
Use the vba editor (Alt-F11) to copy code and forms into your new template.

2> How do I make the code invisible to the end-user, i.e. I don't want them
to be able to "borrow" the code in the end-user's own macros?
In the vbe, under Tools you will find properties for your project. You can
protect your code with a password. Use a longer password with combinations
of letters and other characters for best protection. - Or make your Add-In a
..COM add-in which is beyond my knowledge.

3> What is the best way to accomplish the preceding and distribute updates.
There is a page on the MVP FAQ on distributing macros. Read it.
Will Nelson said:
Thanks in advance.

I've developed and tested macros which reside in my normal.dot.

I need to distribute the macros to a number of sites. I think I want to
create a different .dot file (opinions may vary).
Questions are:

1> How do I create the .dot file containing only the relevant code and forms?
2> How do I make the code invisible to the end-user, i.e. I don't want
them to be able to "borrow" the code in the end-user's own macros?
 

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