When setting MailItem.HTMLBody
for a inline response, sometimes the updated body never gets displayed. If I make a call to MailItem.Save()
, sometimes it shows up but only under saved draft preview. Does anyone know of a way to force the updated HTMLBody to render?
Some addition findings:
- For emails with only plain text (but
MailItem.BodyFormat
isOlBodyFormat.olFormatHTML
), this always happens. - For emails with HTML content and images, this happens if user chooses to download external content when replying
- For emails with HTML content and images, this does NOT happen if user chooses not to download external content
I have tried to use different routes to get the MailItem through the explorer and they all lead to the same results. Here are the different methods I've tried, in case I missed anything:
- Through Outlook.Application.Explorers.NewExplorer event handler arg
- Through
ActiveInlineResponse
property
explorer = OutlookApp.ActiveExplorer();
response = explorer.ActiveInlineResponse;
- Through
InvokeMember("ActiveInlineResponse"...
explorer = OutlookApp.ActiveExplorer();
response = explorer.GetType().InvokeMember("ActiveInlineResponse", BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.Public, null, explorer, null) as MailItem;
Environment:
- Office version: 16.0.10827.20118
- Windows 10
- Office 2007 Primary Interop
- VSTO 2010