Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2008

Tip: Looking for answers? Try searching our database.

Installing a macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RyanF - 27 Feb 2008 14:05 GMT
I've written a macro for Word which multiple people would like to have
installed on their office and personal machines.  In some cases, bringing
their personal machines to me would be inconvenient for them, and travelling
to their residence is an awkward option at best.  In these cases, I would
like to provide them a way to easily and painlessly install my macro (one or
two-click installation, not a 13 step process of manually installing it in
Word).  Is there such a way to create a macro installation file, and if so,
how?
Graham Mayor - 27 Feb 2008 14:54 GMT
Copy it to a template and instruct the user to save the template in the Word
startup folder.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I've written a macro for Word which multiple people would like to have
> installed on their office and personal machines.  In some cases,
[quoted text clipped - 4 lines]
> step process of manually installing it in Word).  Is there such a way
> to create a macro installation file, and if so, how?
RyanF - 27 Feb 2008 15:23 GMT
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?
fumei - 27 Feb 2008 19:53 GMT
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"?????

>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
[quoted text clipped - 14 lines]
>> > step process of manually installing it in Word).  Is there such a way
>> > to create a macro installation file, and if so, how?
RyanF - 29 Feb 2008 07:20 GMT
> 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!

> Exactly as it was posted.
>
[quoted text clipped - 29 lines]
> >> > step process of manually installing it in Word).  Is there such a way
> >> > to create a macro installation file, and if so, how?
Doug Robbins - Word MVP - 29 Feb 2008 10:44 GMT
See the article "Distributing macros to other users" at:

http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>> What do you mean "importing"?????
>
[quoted text clipped - 71 lines]
>> >> > way
>> >> > to create a macro installation file, and if so, how?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.