Reputation: 59
I am trying to connect several macros from Outlook and Excel. One of the functions needs to access vba code from the other program and analyse it. It was quite easy to acces VBA code in Excel from Outlook, for example:
Set WB = Workbooks.Open(Address)
Set codeAddress = WB.VBProject.VBComponents(1).codemodule
But I wonder how to access Outlook macros from Excel. I tried to analyse Outlook application properties through watch window, but I hadn't find anything appropriate. Stackoverflow, have you got any ideas?
Upvotes: 3
Views: 836
Reputation: 49405
The Outlook object model doesn't provide any property or method for that. The VBAProject.otm file contains all Outlook VBA macros.
All Outlook macros are stored in a single file named VbaProject.otm in the user's %appdata%\Microsoft\Outlook folder, which will be a hidden folder on most systems.
Upvotes: 2