abitoun
asked on
Autoinstall a Macro
Hi,
I wrote a simple macro but in order to deliver to the end user i wish instead of me going to each computer, to deliver a cd with a file that will install the macro on the end users computer. Is there a way to do this?
I wrote a simple macro but in order to deliver to the end user i wish instead of me going to each computer, to deliver a cd with a file that will install the macro on the end users computer. Is there a way to do this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Create a new document and save it as a macro enabled document (.docm). Depending on where the macro is at this time, you may have to copy the code in the VBA editor into a new module, or copy the whole module into a new document.
Add a way for the user to run the macro. Apart from pressing Alt-F8 to bring up a long list of macros, a simple but possibly more elegant way is to write a description and instruction and then add an inline macrobutton field. Press ctl-F9 and then complete the field: {macrobutton yourMacroName A button label}. Right-click on it to collapse the field and then double-click on it to test it.
Or rename/create a macro called autoopen and that will execute automatically. To run it, the user can just open it when needed.
To install your macros you have 3 choices. Place it somewhere in My Documents for manual execution, install it to appear in the New Document dialog, os as a startup template to have it always loaded and available eg if you assigning a shortcut key to it. To automatically install the tempalte, here is a simple solution.
Add the following code to your macro enabled document (.DOCM) that will remain on a CD:
Open in new window