Share Macro

A

AndrewA

Sorry if this is the wrong forum for this but...

I have previously and successfully created a macro within
Word that allow a specific set of keystrokes and typed
text when I push an assigned button (let's say F10). When
I save this macro, I save in the normal template and it is
then available to all MS Word documents I open.

Issue: I would like to give this specific set of key
strokes (the "macro") that are invoked when the F10 key is
pressed to a friend so she can use it on her computer.

I would like to not give her a copy of my normal template
as it will then overwrrite her normal template and erase
any other macros etc. she has.

How, in essence, can one share a macro?

I have created the macro within a specific Word Template
(.dot file) but when I then double click on the .dot file
to open a Word document (.doc file), the macro does not
work.

Any ideas?
 
C

Charles Kenyon

Hi,

You are really asking two questions,

The first is "How can I reproduce typed text with a single keystroke?"

In WP, this is traditionally done with a macro. In Word, the best way to
reproduce text (or tables, graphics, etc.) is by storing it as an AutoText
entry.

The second question is how can I share customizations like macros, AutoText,
keyboard shortcuts, and toolbars?

The answer to that is to store them in a separate template, i.e.
"MyGlobal.dot"

That template, when parked in a user's Word Startup folder will make your
customizations available to the user, just as if they were in the user's
normal.dot.
--

Charles Kenyon

See the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
P

Peter Hewett

Hi Andrew

Start the Macro Editor (the VBA IDE) press Alt+F11. Create a new Module for
the macros your want to give to your friend. To create a new Module right
click on the Normal Project (in the project Explorer Window [Ctrl+R]) Insert>
Module. Now just copy and paste the code you want to the new module.

Now right click on the module name in the project explorer window and select
"Export file" and then click on "save". This has created an external text
file (something.bas) with all of the code contained on the module you
exported.

Now email, copy to disk - whatever - the "something.bas" file to get it to
your friend.

On your friends system, start Word and then the Macro Editor. Right click on
the Normal Project (in the project Explorer Window) and select "Import file"
now browse to the "something.bas" file you transferred to your friends system
and click OK.

Now all you have to do is setup any keyboard shorcuts/toolbar buttons to your
macros.

HTH + Cheers - Peter
 

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