You do not need a separate Word addin. In your Outlook addin if you discover
that the window is using WordMail you instantiate a Word.Application object
declared WithEvents. Then you handle the WindowActivate event. If the
Envelope.Visible property is true on the window passed to you in
WindowActivate then it's a WordMail window, if that property is false it's a
Word document.
Knowing that you can then hide or show your UI as appropriate.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
wrote in message
...
Hi,
I found a tip that suggested to write a Word AddIn to search for my
custom CommandBar and removing it from the Word interface. I wrote
such an addin, but it removes the buttom from Outlook Inspector, too!
I'm going crazy. How to know if I'm in Word or in Outlook mail-
inspector?
Kukulkan