Need help with Macros in Word 03

  • Thread starter Thread starter Chris Peikert
  • Start date Start date
C

Chris Peikert

How do you attach a macro to a document so when others try to use the
document the macro will be there as well? Currently the macro only works on
my computer.
 
You must save the macro in the document. When you create it, you must select
the document as the location to save it (by default, macros are saved in
Normal.dot). And then of course others who use it will have to enable the
macro if challenged (and to even given the option, they must have Macro
Security set to Medium rather than High or Very High). A better solution in
some cases is a template containing the macro, installed the User Templates
folder if a document template is required or in Word's Startup folder (as a
global template) if only the macro is required; these are "trusted
locations," so macros will not be challenged provided users' Macro Security
is set to "Trust all installed templates and add-ins.
 
I dont know how to save a macro in a document. I cant find any information
online on this issue either. Can you give me step by step instructions on
how to do this please?
 
If you are recording the macro, in the Tools | Macro | Record New Macro
dialog, there is a dropdown labeled "Store macro in." This is where you must
choose the document you want to save it in (it must be open for editing).

If you are writing a macro in the VBA Editor, you must select your document
in the Project Explorer before writing the macro. Since I don't write VBA, I
can't tell you much more than this; if you are a coder, you presumably know
more than I do. You can move or cut/paste an existing macro from Normal.dot
to any other document or template that is open.
 
First off I dont know anything about scripting or programming or macros.
What I did was created the document. Went to the web and found the script
and copied it. Went back to Word > Tools > Macro > Macros > Create then
pasted the script. I have no idea how to apply or save the macro at this
point. It just seemed to take affect on that document after I saved it. I of
course had to make a shortcut on the toolbar for it. Only problem is the
macro only exist still on this computer and not the document. I am lost as
to what to do now.
 
Thanks for the link but I think its even too complicated for me. The macro I
needed to copy I cant figure out how to get into it to copy the contents.
Before it was over with I lost the whole macro. I have no clue what I am
doing and will probably have to pay Microsoft to walk me through it. *sigh*
 
I was assuming you were trying to copy the macro from a Web site. If the
macro is already installed on your computer, select it in Tools | Macro |
Macros and click Edit. This will open the VBA Editor with the insertion
point at the beginning of the macro you selected.
 
I want to thank you for all your help. I finally got it all to work. I did
at one point call Microsoft but they wouldnt help me at all. They said they
dont support macros. However through all that I am puzzled at one problem. I
created a button on all the documents called Spellcheck at the top of the
toolbar. For some reason it disappered so I had to create a new one. It
wouldnt allow me to call the new one spellcheck so i had to make it say
RunSpellcheck. That and when I open up the toolbar to customize it the
Spellcheck button disappears. Now when I get out of the customize of the
toolbar mode the Spellcheck returns. How do I get rid of that elusive
button?
 
Keep in mind that toolbar buttons are also stored in templates. If you store
one in Normal.dot, it will appear in all documents (because Normal.dot is a
global template); if you store it in a specific template, it will appear
only in documents based on that template. If you have it in both places,
you're going to get it twice. Figure out which of the buttons is excess and
drag it off the toolbar.
 
I was wrong. I dont have it working. Well it is for one document but not for
the others. Not sure what I am doing wrong.
 
If you have the toolbar button stored in a specific template, then the
button will be displayed only in documents based on that template (unless
the template is installed as global).
 
Back
Top