How to select a mail in the outlook inspector programatically in C#?

  • Thread starter Thread starter ksskumar
  • Start date Start date
K

ksskumar

Hi,

I am developing an addins for outlook in C#.

My need is, If I click a custom button on the custom tool bar , a mail
should select automatically in the outlook inspector. Ofcourse I give
some search criteria in the button click event to select the mail.

I can identifiy the mail with my search criteria from the custom
button click event. Means I have mail as outlook mailitem object. But
I am not able to select that mail automatically in the inspector.

Please let me know, if anybody know the way. The code/sample can be
in any programming language.

with regards
kumar
 
You mean display it in an Inspector window? If so, the method you're looking
for is MailItem.Display.
 
Hi Mosher,

Thanks for your comment.

I tried it also, something like this

object OMissing = System.Reflection.Missing.Value ;
MailItem.Display(OMissing) ;

It opens the message, BUT in a the new window, NOT on the the same
window itself. I need to display the message on the inspector window
itself.

OR is there any way to select the mail in the inspector from the code?

regards,
kumar
 
Now I'm really confused about what you're trying to do. What do you mean by
"select the mail in the inspector"?
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Hi Sue

I think he doesnot need to open the mail in a new window.
Mailitem.display() opens the mail in a new window in the default way.

Instead he needs to display the mail body of the selected mail in the
place where outlook displays mail body. But here he will
programmatically select the mail item thru some custom logic

Simply he wants to display the mail body of the program selected mail
item in the outlook window where mail body is displayed.
Anushya
 
Back
Top