In %appdata%\Microsoft\Office\olkapptitem.officeUI
I have:
<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="DoIt">
<ribbon startFromScratch="false">
<tabs>
<tab idMso="TabMail">
<group id="group1" label="Hazaa!">
<button id="one" onAction="DoIt2" label="hi" visible="true"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
In Outlook, in the VBA editor, I have a module called Module1 that has:
Option Explicit
Sub DoIt(ribbon As IRibbonUI)
MsgBox "hi"
End Sub
Sub DoIt2(control As IRibbonControl)
MsgBox "bye"
End Sub
However, neither DoIt
or DoIt2
will run. If I take out the parameters from DoIt2
then when I click the button it will run, but not the other way.
Any help is appreciated.