Problem when adding new toolbar on NewInspector when editor type in Word - Outlook 2003

H

Harry

Hi,
I am getting problem when i am trying to add new toolbar on
NewInspector window of Outlook 2003.

1) I am able to add a new toolbar, but my first problem is that, this
added toolbar is also gets visible/enable when i open the Word
Application. That is the CommandBar of Word Application also gets
modified when i modify the CommandBar of Inspector collection of
Outlook 2003.

2) And my second problem is----
I have added the button on this new toolbar. It works
fine for single instance of Inspector, but when there are multiple
instance of Inspector then on click of button the fuctionality of it
gets call by number of times as much as instance of Inspector are
open.

Please help out, i am really get frusted as i have spend lots of time
on it and i have to submit this as early as possible.

-Thanks
 
K

Ken Slovak - [MVP - Outlook]

You will need to handle Word events in your Inspector handler. When the
Word_WindowActivate event fires you need to check for wn.EnvelopeVisible =
True. If that is true you are in an active email window, if false it's a
Word document window.

If it's a Word document you need to hide your UI by setting the .Visible and
..Enabled properties to false. Set them true if it's an email window.

You also will probably have to re-instantiate your button objects and other
UI each time you access it that way, or you will get errors that the
properties are not available. That's a specific problem, as is the fact that
Word does not honor the Temporary := True argument. So you will have to
explicitly delete your UI when the Inspector is closing.

Google for other posts I've made here and in the other Outlook programming
groups about the other problems with WordMail Inspectors and how to handle
them. You'll also find code samples.

For your other problem you will need to add a unique Tag property to each
button and other UI object you create. You will also need to set up an
Inspector wrapper class and collection to handle multiple open Inspectors.

Since you did not mention what language you are programming in or what
development platform you are using I can't recommend any specific Inspector
wrapper samples, but they are out there for VB 6 and VB.NET and C#.
 
M

Mohit

I am also facing the same problem of toolbar also added to other
running instances of word when one is added to Word instance of
Outlook.

I am not getting how to handle the Word event in Outlook Inspector
handler. Please give more information on it.

Thanks in advance.
 
K

Ken Slovak - [MVP - Outlook]

Please do not hijack old threads.

Did you google for posts I've made in this and other programming groups
about how to handle WordMail? I've posted solutions many times.
 

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