> What do you mean "importing"?????
I open up Word. I click on the Tools menu, then Macro, then Visual Basic
Editor. (http://img149.imageshack.us/my.php?image=screen1iw4.png)
I select and expand "Normal" in the Project Explorer. I click on the File
menu, then "Import File...", and then I import my file, "MyMacro.bas".
(http://img180.imageshack.us/my.php?image=screen2cr8.png)
My macro then appears under the "Modules" folder under "Normal".
(http://img181.imageshack.us/my.php?image=screen3dx3.png)
This is the only way that I knew how to do this so that all new documents
would have access to the Macro. If I am doing something my way that could be
done in an easier, safer, or more secure way, please let me know, with
instructions. Assume that I know nothing about Microsoft Word or VBA
programming to avoid unnecessary questions. I am very interested in learning
the details of "why" and "how", so please explain as much as necessary.
Also, when I set this up for users now, I also add a button and assign a
shortcut key for the macro. Is there a way to do this short of creating an
installer? If I had to create an installer, where can I find instructions on
how to create such an installer (specifically, instructions on how to
install/integrate things into Word).
Thanks for all your help so far!
"fumei via OfficeKB.com" wrote:
> Exactly as it was posted.
>
> Copy the code to a new file, save that file as a template (.dot), and have
> them put it in their Startup folder.
>
> These are called global templates, and you really should put your own code in
> one as well.
>
> It is not a good idea to put code in normal.dot. Even Microsoft suggests not
> doing that. Normal.dot is easily corrupted.
>
> "so I've been importing it under "Normal" in the VB editor so far"
>
> What do you mean "importing"?????
>
> RyanF wrote:
> >I'm actually pretty new to this; this is the first macro that I've written.
> >It is intended to be available in all new Word documents, so I've been
> >importing it under "Normal" in the VB editor so far. I don't want to hand
> >someone my "Normal.dot" template and have it overwrite anything useful in
> >their own, so could you elaborate a bit on what your instructions meant?
> >
> >Also, to take this a step further: my current implementation includes
> >creating a button for the macro on a toolbar (Standard or Quick Access,
> >depending on which version of Office they have) and assigning a shortcut key
> >to the macro as well. How difficult would it be to automate these tasks for
> >the user as well so I don't have to give them a difficult set of instructions
> >to follow?
> >
> >> Copy it to a template and instruct the user to save the template in the Word
> >> startup folder.
> >[quoted text clipped - 7 lines]
> >> > step process of manually installing it in Word). Is there such a way
> >> > to create a macro installation file, and if so, how?
>
> --
> Message posted via http://www.officekb.com
>
>