(Solved) – How to Set Outlook Mailitem To Message Within Outlook Application


I cannot figure out how to set a MailItem variable to an active message being composed if the message is not its own window (i.e. within Outlook). I have seen several answers that explain how to set the variable to an open window such as this:

Dim theEmail As MailItem, oInspector As Inspector
Set oInspector = Application.ActiveInspector
Set theEmail = oInspector.CurrentItem

This works great in a situation when an message draft is a new window. However this does now work if the draft is within Outlook. How can I reference an active draft that’s not a new window?

I’ve seen posts saying Set theEmail = ActiveExplorer.Selection.Item(1) however this references the received message being replied to, not the draft of the reply.


Leave a Reply

Your email address will not be published. Required fields are marked *