Consulting

Results 1 to 9 of 9

Thread: can't save an Outlook macro

  1. #1
    VBAX Regular
    Joined
    May 2010
    Posts
    65
    Location

    can't save an Outlook macro

    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?

  2. #2
    VBAX Regular
    Joined
    May 2010
    Posts
    65
    Location
    Let me simplify my question:
    How do I make an Outlook add-in from an Outlook macro ?

  3. #3
    VBAX Regular
    Joined
    May 2010
    Posts
    65
    Location
    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.

  4. #4
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    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

  5. #5
    VBAX Regular
    Joined
    May 2010
    Posts
    65
    Location
    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

  6. #6
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    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.
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

  7. #7
    VBAX Regular
    Joined
    May 2010
    Posts
    65
    Location
    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?

  8. #8
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    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.
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

  9. #9
    VBAX Regular
    Joined
    May 2010
    Posts
    65
    Location
    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.
    Last edited by dschmitt; 10-14-2011 at 01:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •