As far as I can tell, the only way to run the named macro programmatically in Outlook (without using custom classes like the other answer here) is to create a temporary CommandBarButton, execute it, and delete it immediately. This works in Outlook 2013 even with the ribbon:
Public Sub runProc(procToRun As String) With Application.ActiveExplorer.CommandBars.Add("Custom", temporary:=True) With .Controls.Add(msoControlButton, 1, , , True) .OnAction = procToRun .Execute .Delete End With .Delete End With End Sub
I know this is an old question, but I could not find this exact answer myself at the end of 2017, so hopefully this will help someone else. Note that this does NOT run macros that are in ThisOutlookSession ... your macro must be in a code module.
source share