Reputation: 3638
I have a mail item that is picked from one of the folders of outlook. I'd like to open, say outlook native Reply dialog for this mail item. How can I do that?
Upvotes: 2
Views: 1544
Reputation: 3638
Ok, I have figured out the answer myself (so fast!)
After some googling, I landed on this page Outlook Object Model, Stumble upon the following point
Use the GetInspector method of a specific item, such as a MailItem or ppointmentItem, to retrieve the Inspector that is associated with it.
Note from that page only
The Inspector object represents a window that displays a single item such as an e-mail message, task, or appointment
At this point I remembered that MailItem has methods for forward/reply; however, those return respective MailItem objects. I then remembered that I also saw there a Display method within the class that shows an associated inspector ... browsing through to the definition of Display, it was revealed that it "displays" a new inspector for that object. Wow!
So here's the code for those who are keen to know and has to read all through my perhaps boring tale of deduction:
mailItem.Reply().Display();
It's that simple! What a shame! :-)
Upvotes: 3