Ken: Questions on your Inspector Wrap Class

S

Sanjay Singh

Hi Ken

I am using a copy of your Inspector Wrap class in my code. I have a couple
of questions that I hope you can help with.

1. Unique key for toolbar: I noticed that each button on a commandbar has to
have a unique key to avoid buttons getting fired more than once. How about
the actual command bars. I am adding a custom command bar to Inspectors.
Should they also have a unique key for each time an Inspector opens.

2. KillButtons: You have a sub called KillButtons in your code but this does
not appear to get called from any place. Should this sub be called from
anywhere in the code. I am creating my menu buttons as temporary buttons.

3. Question re Explorer buttons: In your InspectorWrap class, the buttons
are defined within the class. However in Randy's Items sample, the Explorer
command buttons are defined outside of the wrapper class. Is there a reason
for the difference since it is possible to have multiple explorers as well.

Thank you for your help
Sanjay
 
K

Ken Slovak - [MVP - Outlook]

1. I use a unique Tag for anything I add. That includes new menus/toolbars,
popups and buttons. I always use something like a name + the string value of
the Key property of the Inspector or Explorer. Where I create similar
buttons on both Explorers and Inspectors I use naming conventions similar to
"ExplButtonSomeAction" and "InspButtonSomeAction".

2. I call KillButtons in the Inspector Close event and also in the Close
events for any items that I'm sinking. So if I declare a MailItem WithEvents
in the Inspector class module I call KillButtons in the MailItem Close
event. My bad, it looks like I left out the Inspector Close event handler
from the wrapper I put up. I'll update it with that and a couple of other
things I just noticed I left out when I get a chance.

3. I create Explorer CommandBar objects in the Explorer wrapper class and
not in a global procedure as is done in ItemsCB. Some day, when we have
time, we plan to update ItemsCB with that, calls to AddInMon, an Inspector
wrapper and maybe some other wrapper examples, and various other things that
have been added to my addin templates and the ones that David uses at
MicroEye..
 
S

Sanjay Singh

Thank you as always for your help. I am currently trying to work out why my
addin keeps getting disabled in Outlook 2003. I have been looking at
everything that I can to see if it solves the problem but have had no luck
so far.

One of the things I noticed ..
I get an "Out of Stack error" sometimes ...and then Outlook shuts down.

I looked for the CreateObject problem that you identified but could not find
it in my code. Any clues as to where I could look.

Sanjay
 
K

Ken Slovak - [MVP - Outlook]

Usually a stack error like that is due to a recursive procedure that
re-enters too many times or doesn't unwind itself correctly. If the problem
is due to that smart tags issue you have been having then I have no idea, I
really haven't worked with smart tags much at all and not since the Outlook
2002 beta.
 

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