PDA

View Full Version : can't save an Outlook macro



dschmitt
10-05-2011, 10:26 PM
In Excel and PowerPoint I can create an Add-in file (xlam, ppam) that with a customUI embedded will add a custom button to the Excel or PowerPoint menubar and allow me to execute the macro in the add-in.

Similar in Word I can create a Word Macro-enabled Templete file (dotm) that with a customUI embedded will add a custom button to my Word menubar and allow me to execute the macro in the templete file.

The Excel and PowerPoint add-in reside in the Microsoft/AddIns folder. The add-in need to be activated in the Excel options and PowerPoint options respectively. The Word templete resides in the Microsoft/Word/STARTUP folder and is added automatically to the menubar.

How about in Outlook?
I can create a macro in a New Mail Message window and execute it via the Developer tab.
But how do I create a New Mail Message add-in file?
And where do I need to put the add-in?
And is it possible to add a customUI script to the add-in file so that I can execute the macro from the menubar in every New Mail Message window?

dschmitt
10-06-2011, 06:09 PM
Let me simplify my question:
How do I make an Outlook add-in from an Outlook macro ?

dschmitt
10-06-2011, 07:08 PM
I will try to answer my own questions:

Outlook (Vista 2007) New Message windows can not be saved as macro-enabled or add-in files. Furthermore, from the Office button/Editor Options window there is no Add-ins preferences window available. Therefore, add-ins cannot be used in Outlook.

In respect to Ribbon modification that also seems not possible in Outlook. Following the Ribbon programming concept in Excel, PowerPoint and Word I tried to access hidden folders in the file in which Outlook stores macros (VbaProject.OTM) by converting it to a ZIP file. There are no hidden folder. The same is true for Outlook templete files.

Charlize
10-07-2011, 12:09 AM
I'm afraid that's not possible in a 1, 2, 3 solution. According to me you need :

1. a copy of Visual Studio Express 2010
2. know how to make a new project add-in
3. code the necessary stuff
4. compile you code
4a. do some testing and get bugs out
5. create and distribute your new add-in

The first two I'm fairly sure that I can handle those but the 3rd one will require a new understanding (ie. some learning to do) of how all is connected.

Charlize

dschmitt
10-07-2011, 03:17 AM
The macro was essential. Thanks again. The addin and the ribbon addition are nice to have.

I was able to figure out how to do the ribbon in Excel, PP and Word. All that is described online and in books. It was a challenge for me to learn but it was fun and is useful. For me Outlook addin and ribbon programming are out of my league.

If you are challenged by the idea to create an addin and ribbon addition please give it a try and post the result here. But if you don't have time to spare than don't bother.

Detlef

JP2112
10-13-2011, 12:01 PM
If you are using 32-bit Outlook you can just use VB6. It's almost identical to VBA. Deployment is simple, just register the compiled DLL using regsvr32. You can do this manually or use a free installer like Inno Setup if you plan to deploy the addin on multiple machines.

dschmitt
10-13-2011, 06:50 PM
JP2112 I have acouple questions regarding you suggestion.

1. I found on my computer a file called "msvbvm60.dll". Is that VB6?
2. Onces VB6 is registered how do I start it? Is it a stand alone program? Does it run in MS Office?

JP2112
10-13-2011, 07:14 PM
1. I found on my computer a file called "msvbvm60.dll". Is that VB6?
2. Onces VB6 is registered how do I start it? Is it a stand alone program? Does it run in MS Office?

Afraid not, friend. That file is one of the VB6 run-time files; VB6 is a commercial standalone program. It is quite old but you can still find copies on eBay. Even at $200-$300 it is still cheaper than VSTO, and easier to write code for if you already know VBA. It is the easiest way I've found to create Outlook addins.

dschmitt
10-14-2011, 01:14 AM
I see. Thanks for the information. One more question. Once you have created the Outlook add-in, how do you activate it in Outlook 2007? There is no Add-Ins window in the Outlook Editor Options.