PDA

View Full Version : Make macros and custom tab available to Word 2010 users



agent86
11-30-2013, 09:33 AM
Word 2010

New to Word VBA programming.

I created macros to perform different tasks. I put them in a .docm file. Because I don’t know exactly what I needed I also created a .dotm file as well. They both work fine.

I now need to make the macros available to an application that uses Word 2010. It has its own template so I can't add the macros to their template because it could change without me knowing it. I also used RibbonCreator 2010 from IDBE Avenius, love the product and the support by the way, to create a custom ribbon with buttons that “trigger” the macros.

What I don’t understand is how to make the macros available automatically for any and all users of the other application. How do I make this an “add-in” or whatever you call it so it will make the ribbon and the macros available to the end user. Do I load the file in a certain folder? How do I tell Word 2010 that the macros, the .docm or the .dotm file exist?

Any help or links would be appreciated. Thanks.

macropod
12-01-2013, 04:30 PM
Unless you can modify the application's template, you can only make your macros available by adding them to a global template like Normal.dotm that you can be sure of being loaded anytime Word is started. See:
http://msdn.microsoft.com/en-us/library/office/aa189710(v=office.10).aspx, http://office.microsoft.com/en-us/word-help/enable-or-disable-add-ins-in-office-programs-HA010034127.aspx

Paul_Hossler
12-01-2013, 05:01 PM
In Word 2010 I just put my CustomUI DOTM in ...\AppData\Roaming\Microsoft\Word\Startup

That's one of the standard MS Word2010 locations: Application.StartupPath

It's a Trusted Location, but I don't remember if I made it that, or if Word defaults to that. Also don't remember if I had to add it via [Options] or not. Either way, it was easy and now the special CustomUI tab is there for all documents

http://moreaddin.com/faqs/where-is-words-startup-folder.html



Paul (The other one) :beerchug:

agent86
12-02-2013, 08:07 PM
Thanks Paul...that worked!