Adding button to Inspector?

B

Brian McCullough

Where is the most appropriate place to add a button to the toolbar in an
Inspector?

I have implemented an Inspector wrapper class (I am using VB6) and I am
adding a button only for MailItems that have been received (i.e. not New or
a Draft MailItem objects). I have my button currently getting created in
the MailItem's Read event (seems like the most logical place for this since
I only want the button created when I am reading a message) which is being
handled within the Inspector wrapper class.

The problem is that when I use the Up/Down arrows available to me in the
Inspector to scroll through the messages (without closing the Inspector
window), my button keeps getting added.

Although unlikely, I guess, potentially, I would need to check each time a
new message is loaded in the Inspector to determine if the button should be
loaded/unloaded since the folder the user is moving through may contain
Draft messages. Which events are fired when you use the Up/Down arrow in
the MailItem Inspector?

TIA!!
 
K

Ken Slovak - [MVP - Outlook]

Use the first Inspector.Activate event for that. When Next or Previous are
used you may or may not get a new Inspector depending on the Outlook version
and service pack. You can check for a different Inspector.CurrentItem in
subsequent Activate events and if it's different than your stored item you
can update your wrapper properties.

Always check to see if your UI exists before creating it and if you want to
create a new UI delete any existing UI first.

An example of the different behaviors of Next or Previous with different
versions and service packs is listed at
http://support.microsoft.com/?kbid=321326.
 
B

Brian McCullough

Thanks Ken,

That link doesn't have a heck of a lot of good information in it. Just says
that the behavior is affected in Office XP Standard and has been resolved as
of Office XP SP2. I am running SP 3 and am still seeing strange behavior.

-Brian
 
K

Ken Slovak - [MVP - Outlook]

There's not much documented on it but the problem in different ways
manifests itself not only in versions of Outlook 2002 but in 2003 and 2000
also.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top