I want to write a vba macro in a word document that can be distributed to
other Word users. This macro should create a new macro (see below) in the
normal.dot template and create a macro command entry on the Formatting
toolbar.

How is this done?

Regards
Frank Krogh

________________



' AdjustTables Macro
Application.ScreenUpdating = False
For Each aTable In ActiveDocument.Tables
aTable.AutoFitBehavior (wdAutoFitContent)
Next aTable
Application.ScreenUpdating = True
End Sub

Re: Newbie: how to use vba to install a word macro on other machines? by Shauna

Shauna
Wed Oct 04 08:04:58 CDT 2006

Hi Frank

I suggest you re-think your proposed method of distributing the macro to
other users. I suggest that you:

1. Use File > New and create a new template (not document).

2. Copy your code into that new template.

3. With your template open, use Tools > Customize. On the Commands tab, make
sure that the Save In box refers to your template. Add the button to the
Formatting toolbar that will run your macro.

4. Save it in your Word startup folder (it's given at Tools > Options > File
Locations, and is probably C:\Documents and Settings\<user name>\Application
Data\Microsoft\Word\STARTUP).

5. Assuming that you have a very small number of users, then email the file
to your users and tell them to save it to their Word startup folder (like
yours, probably C:\Documents and Settings\<user name>\Application
Data\Microsoft\Word\STARTUP).

Now, when each user starts Word, your template will load as an add-in, your
toolbar menu will be available and it will run your macro.

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

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Frank" <Frank@discussions.microsoft.com> wrote in message
news:54DDEA42-19A0-4781-86B4-A41A5C363559@microsoft.com...
>I want to write a vba macro in a word document that can be distributed to
> other Word users. This macro should create a new macro (see below) in the
> normal.dot template and create a macro command entry on the Formatting
> toolbar.
>
> How is this done?
>
> Regards
> Frank Krogh
>
> ________________
>
>
>
> ' AdjustTables Macro
> Application.ScreenUpdating = False
> For Each aTable In ActiveDocument.Tables
> aTable.AutoFitBehavior (wdAutoFitContent)
> Next aTable
> Application.ScreenUpdating = True
> End Sub
>



Re: Newbie: how to use vba to install a word macro on other machin by Frank

Frank
Wed Oct 04 08:44:01 CDT 2006

Thank you for the nice solution :-)

Regards

Frank Krogh

"Shauna Kelly" wrote:

> Hi Frank
>
> I suggest you re-think your proposed method of distributing the macro to
> other users. I suggest that you:
>
> 1. Use File > New and create a new template (not document).
>
> 2. Copy your code into that new template.
>
> 3. With your template open, use Tools > Customize. On the Commands tab, make
> sure that the Save In box refers to your template. Add the button to the
> Formatting toolbar that will run your macro.
>
> 4. Save it in your Word startup folder (it's given at Tools > Options > File
> Locations, and is probably C:\Documents and Settings\<user name>\Application
> Data\Microsoft\Word\STARTUP).
>
> 5. Assuming that you have a very small number of users, then email the file
> to your users and tell them to save it to their Word startup folder (like
> yours, probably C:\Documents and Settings\<user name>\Application
> Data\Microsoft\Word\STARTUP).
>
> Now, when each user starts Word, your template will load as an add-in, your
> toolbar menu will be available and it will run your macro.
>
> More info at
> Distributing macros to other users
> http://www.word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm
>
> Hope this helps.
>
> Shauna Kelly. Microsoft MVP.
> http://www.shaunakelly.com/word
>
>
> "Frank" <Frank@discussions.microsoft.com> wrote in message
> news:54DDEA42-19A0-4781-86B4-A41A5C363559@microsoft.com...
> >I want to write a vba macro in a word document that can be distributed to
> > other Word users. This macro should create a new macro (see below) in the
> > normal.dot template and create a macro command entry on the Formatting
> > toolbar.
> >
> > How is this done?
> >
> > Regards
> > Frank Krogh
> >
> > ________________
> >
> >
> >
> > ' AdjustTables Macro
> > Application.ScreenUpdating = False
> > For Each aTable In ActiveDocument.Tables
> > aTable.AutoFitBehavior (wdAutoFitContent)
> > Next aTable
> > Application.ScreenUpdating = True
> > End Sub
> >
>
>
>