Re: Late Binding with event handling



Am 14 Mar 2006 15:39:25 -0800 schrieb jz:

I'm not familiar with that mentioned article. Why don´t you build your own
classes, one for each OL version, and use an Interface? That is the
mechanism for avoiding late binding.

At the start you can determine the OL version and instantiate the proper
class.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi All,

I have been read a lot of posts in the group about late binding, but I
have gotten much help from it;
Here is my problem

I have developed an outlook Com Addins with early binding but there is
a very small bug in which my commandbarbutton icon image doesn't show
up for combination of Win2k + Outlook Xp, only when mouse moves over
the button, the image can show up. I tried very hard to find the
reason, but so far with very little luck;

So I decided to use the late binding, with use different approch for
the buttom icon with office version > 10; so there is a property
.Picture;

Button Icon is working fine after all, but the event obButton_Click
doesn't work;

I got idea from the group about the MSDN article " COM: Handle
late-bound Events with Visual Basic Using an ATL Bridge" by Carlo
Randon;

The sample code works fine, but how can I use it with Commandbarbutton
object which doesn't have IDispatch interface implemented; therefore
incomingevent event doesn't work even I monitor my CommandbarButton
Object;

does anyone can help me in the concret way;


Thank you very much


jz
.