VB6 COM addin for Outlook - CommandBarButton problem

  • Thread starter Thread starter R Avery
  • Start date Start date
R

R Avery

I am writing a VB6 COM addin for outlook, and i an having trouble with
getting the custom menuitems that I programmatically create do anything.
In VBA i am used to just setting the OnAction property, but this does
not seem to be working. I have done some web searches, but I haven't
found any clear explanation of what I have to do. Some said things
about creating custom TAG properties for each button, and had a
different syntax than I am used to for setting the OnAction property...

could someone explain to me what I have to do?

Also, in case this is material, I am also interested in having multiple
menuitems call the same procedure in the DLL.

Any help would be most appreciated.
 
You need a unique Tag for each instance of the button you create. Otherwise
every time one button is clicked you will get an event in each button
handler.

See the ItemsCB COM addin sample in VB6 on the Resources page at
www.microeye.com for a working template that shows how to create buttons and
handle multiple Explorers using an Explorer wrapper collection. You can also
look at the Inspector wrapper I've posted at
http://www.slovaktech.com/code_samples.htm#InspectorWrapper to see how to
handle multiple open Inspectors.

ItemsCB shows how to use the special syntax needed for buttons in a COM
addin as well as workarounds for many common Outlook COM addin bugs.
 
Back
Top