Re: word macro as a file
On Mon, 04 Feb 2008 18:52:24 -0500, John Smith wrote:
>Can I store a macro as a file instead of assigning it to
>toolbar or keyboard? How?
If you want to be able to execute the macro, it _must_ be stored in a template
or document by being entered in the VBA editor, and that template or document
must be loaded in Word.
You can _store_ a macro as a text file, by right-clicking the module's icon in
the Projects pane of the editor and choosing Export. However, the resulting file
can't run until you import it into the editor.
Also, there are more ways of running a macro than just a toolbar button or a
keyboard shortcut. You can use the Macros dialog (Alt+F8), or a MacroButton
field (http://www.word.mvps.org/FAQs/TblsFldsFms/UsingMacroButton.htm), or a /m
switch on the command line (http://support.microsoft.com/?kbid=210565), or an
ActiveX command button
(<http://msdn2.microsoft.com/en-us/library/aa140269(office.10).aspx>), or a call
from an external COM-based program... But none of those will be able to execute
a macro that's stored only as a separate file.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
date: Mon, 04 Feb 2008 20:41:27 -0500
author: Jay Freedman