Enable Outlook Add-in when Word Editor is enabled in Outlook 2003

  • Thread starter Thread starter Hichem Sarrai
  • Start date Start date
H

Hichem Sarrai

Hi,
When I open an inspector for a new mail in outlook 2003, the inspector loads
the word add-in I created which is different from my outlook addin. How can I
load the outlook addin instead of the word one?
Thanks for your help
 
Hi,

What I understand is that when the Envelope is visible, then I should
implement in my word-add the functionalities that are performed in my outlook
add-in...
If yes, then how can I access field such as Subject, To, CC in the envelope?

How to get the MailItem while I am in the word editor? how cas I save the
current document as an email (.msg)?

Thank you for you help?
 
No, both addins are completely separate.

Any email related functionality should be implemented in the Outlook addin,
Word document functionality in the Word addin. When in the Outlook addin
handle Word.WindowActivate() to see which UI to enable/disable by checking
for Window.Envelope.visible == true (email item). Use that to enable/disable
your Outlook created UI. Use the same event in Word to enable/disable any
Word created UI.

That way both are independent and don't conflict with each other.
 
Hi Ken,
Should I then understand that every time an envelope is visible (In Word or
in Outlook), then I can't treat it as an email? (For example I can't save it
as an email)

To make myself understood, did you ask me also to disable my word add-in
every time I have an envelope visible?

Thank you for ur help.
 
If Window.Envelope.Visible = true then it is an email item. There's very
little information you can get from that using the Word object model in a
Word addin. If it's an email item use Outlook code to deal with it in the
Outlook addin.

Whether or not you disable your Word addin and any UI it might create when
the item is a WordMail item is up to you. Do you want your addin running and
its UI showing in that case? If so then don't disable your Word addin and
its UI. If you don't want it there in a WordMail item then disable its UI. I
can't know what you want.
 
I am confused!!
My comments are included in yours!
If Window.Envelope.Visible = true then it is an email item. There's very
little information you can get from that using the Word object model in a
Word addin. If it's an email item use Outlook code to deal with it in the
Outlook addin.
*The problem is that case (in the case of a Word Editor in Outlook) the
outlook add-in is not loaded? (that was my first question in this thread and
you said that both addins are completely independents)
* When you say email item do you see it as _MailItem object?
Whether or not you disable your Word addin and any UI it might create when
the item is a WordMail item is up to you. Do you want your addin running and
its UI showing in that case? If so then don't disable your Word addin and
its UI. If you don't want it there in a WordMail item then disable its UI. I
can't know what you want.
What I do in Outlook : When I click on a button X and an email item is
selected, then some code runs. The final result of this is a ".msg file" that
have all the information concerning the email (Subject, To, CC,
Attachement....)
I want to do the same when I have a word editor (envelope is visible) ???

Thank you for ur help
 
Inline.




Hichem Sarrai said:
I am confused!!
My comments are included in yours!

*The problem is that case (in the case of a Word Editor in Outlook) the
outlook add-in is not loaded? (that was my first question in this thread
and
you said that both addins are completely independents)

They are independent. One runs in Word and the other runs in Outlook. In the
case of WordMail 2003 or earlier both would be active since Word is invoked
and the item is an Outlook mail item.
* When you say email item do you see it as _MailItem object?

Yes, in Outlook I see a mail item in the Inspector I'm handling. There is no
MailItem in Word and I don't use Word to deal with the item.
What I do in Outlook : When I click on a button X and an email item is
selected, then some code runs. The final result of this is a ".msg file"
that
have all the information concerning the email (Subject, To, CC,
Attachement....)
I want to do the same when I have a word editor (envelope is visible) ???

So do the same thing when you have a WordMail item, deal with it in Outlook
code.

You had originally asked about not showing the incorrect UI or multiple
copies of the UI and I answered that.
 
Back
Top