How do you get a reference to the mail item in the current open window in Outlook using VBA?
Apparently this is the code to get the current open item:
If TypeName(Application.ActiveWindow) = "Inspector" Then
Set Item = Application.ActiveWindow.CurrentItem
I did it like this. Declare the Item as a MailItem instead of an Object and then you get help from IntelliSense.
Dim CurrentMessage As MailItem
Set CurrentMessage = ActiveInspector.CurrentItem
CurrentMessage.HTMLBody = "[Insert HTML here]"