0
votes

I'm trying to control Outlook via Excel by VBA ofc.

My Excel code creates and XML that adds button to Message Ribbon. The button's job is to save email to specific location given by Excel. I cant run Excel macro from Outlook macro because you cant access VB Project of Outlook. It needs to be provided for couple of persons and this is hard to deploy and control. So I thought maybe I can capture click event of that button from excel. I've seen examples to capture Reply button but nothing else.

I'm looking for place in Outlook object where this information might be stored. And any help with that, different approaches are welcome as well.

1

1 Answers

0
votes

It looks like you need to develop a COM add-in instead of VBA macro. First of all, you can't modify the Ribbon UI in Outlook from VBA macros as you do it in Excel. Second, VBA macros are not designed for distributing them on multiple machines. That is what COM add-ins were invented for. See Walkthrough: Create your first VSTO Add-in for Outlook to get started quickly.

The following articles provide instructions on how to create a custom ribbon UI: