Home All Groups Group Topic Archive Search About

Inspector CommandBarButton with Word as Mail

Author
20 Dec 2004 2:51 PM
Todd
I am currently using a wrapper class for each inspector object that is
created. Inside of the wrapper class, the buttons are created and then tied
to events. The wrapper class is then added to a collection (similar to the
explorer wrapper from microeye).

Unfortunately I am having problems getting the solution to work with Word as
the editor. If the user is using Outlook to edit messages everything works
like a charm, however, if Word is the editor, all events are passed to the
first instance of the wrapper.

Hence if one inspector is open, it works. Opening the second causes the
first inspector to fire a click event twice, and the second to not register
clicks at all.

I'm stumped, and any help is greatly appreciated!!

Thanks in advance!

Author
21 Dec 2004 1:46 PM
Ken Slovak - [MVP - Outlook]
You will only get the NewInspector event with Outlook 2002 and later for
WordMail, so you can't use a WordMail solution with Outlook 2000 at all.

Any button you create must have a unique Tag property and should be created
within the Inspector wrapper class module. Other than that putting up a
button in a WordMail item is not much different than in an Outlook editor
item.

You will end up with permanent buttons stored in Normal.dot for WordMail
unless you delete the buttons explicitly, Word has no concept of Temporary
buttons as Outlook does, and changes you make will either cause the
Normal.dot to be automatically saved or prompt for saving depending on the
user's Word settings unless you set
Inspector.WordEditor.Application.CustomizationContext.Saved = True after
adding your buttons and then again after deleting them. I always check the
Saved status before deleting to see if I want to set Saved = True in case
the user modified something during the time WordMail was open.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


Show quoteHide quote
"Todd" <T***@discussions.microsoft.com> wrote in message
news:50E78E53-9606-431C-ABB0-4DC244A7DB6D@microsoft.com...
> I am currently using a wrapper class for each inspector object that is
> created. Inside of the wrapper class, the buttons are created and then
tied
> to events. The wrapper class is then added to a collection (similar to the
> explorer wrapper from microeye).
>
> Unfortunately I am having problems getting the solution to work with Word
as
> the editor. If the user is using Outlook to edit messages everything works
> like a charm, however, if Word is the editor, all events are passed to the
> first instance of the wrapper.
>
> Hence if one inspector is open, it works. Opening the second causes the
> first inspector to fire a click event twice, and the second to not
register
> clicks at all.
>
> I'm stumped, and any help is greatly appreciated!!
>
> Thanks in advance!

Bookmark and Share