View Single Post
  #3  
Old February 5th 09, 12:39 AM posted to microsoft.public.outlook.program_addins
Hichem S
external usenet poster
 
Posts: 13
Default Why Word toolbars are hidden when Outlook with WordMail is lau

Sorry Ken but this does not answer my question...
I actually went through all you described but I am doing it a little bit
different. I am actually hiding the outlook addin (using
inspector.IsWordMail) and I am using the Word addin when it comes to handle
WordMail (using EnvelopeVisible) : if the Envelope is visible then I treat
the document as an email. If it's not i treat it as a word document. This
solution allow me not to play with WindowActivate/Deactivate to hide and show
the toolbars : In fact only one toolbar is created by application.

I hope this will help to understand my question : When I open Outlook with
wordmail configured (I don't open yet a word application), Outlook hides the
toolbar created by the Word process that was launched in the backgroud
(:wordmail).
If then I open Word my toolbars are infact Invisible...what happened?






"Ken Slovak - [MVP - Outlook]" wrote:

Handle WindowActivate events in Word object model code in both addins. Test
for wn.EnvelopeVisible = True. That means a WordMail window, False means a
Word.Document window.

You can iterate the CommandBars collections and set your Enabled and Visible
properties as desired. I usually disable the custom Word toolbars in
WordMail and vice versa.

You also have to handle cases where more than one WordMail Inspector and/or
more than one Document are open at a time so multiple copies of toolbars
aren't visible.

--
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


"Hichem S" wrote in message
...
Hi,
When launching an Outlook application that is configured to use WordMail
as
the default mail editor, a Word process is started in background. This
word
process will load my word addin that creates a toolbar and a popupmenubar.
Unfortunately when I then open word (after opening Outlook as previously
described), my toolbar is invisible while the popupmenu bar is visible.
Can anybody explain to me what happens? Why Outlook hides the word
toolbars?
and what can be done other than making the toolbar visible in the
WindowActivate event of Word. Note that this solution is not satisfying
since
we force the visibility of the toolbar to true, while the user might wants
to
hide it!!
I really don't want Outlook to hide the Word toolbar

Thanks you very much for the answer...
Hichem



Ads