Mail Body blank & uneditable in Inspector window

Add-in Express™ Support Service
That's what is more important than anything else

Mail Body blank & uneditable in Inspector window
 
Paul Riddington


Guest


On Windows 10 (version 1709 and 1607) and Outlook 2016 (version 2016, 16.0.9330.2124 and 16.0.8431.2079) we have an issue where if run the mailto protocol as such: mailto:&subject=subject&body=body and run the following code:

private void ADXOlForm1_ADXAfterFormShow()
{
 Inspector i = this.InspectorObj as Inspector;
 MailItem mailItem = i.CurrentItem as MailItem;
 string body = mailItem.Body;
 Marshal.ReleaseComObject(mailItem);
} 

The body of the inspector window is blank and you cannot focus the cursor, either by pressing the mouse or tabbing through the controls. We have tried this same code in ADXOlForm1_Load, ADXOlForm1_Activated etc. and the same result occurs. We believe this works in previous versions of Office (and possibly older versions of Outlook 2016).
We have a developed a sample addin that reproduces this if it's of any use?
Posted 28 Jun, 2018 07:26:18 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Paul,

Please send the sample project to the support email address; see readme.txt in the Add-in Express installation folder. Also, please make sure your email contains a link to this topic. What Add-in Express build are you using?


Andrei Smolin
Add-in Express Team Leader
Posted 28 Jun, 2018 07:35:08 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Paul,

Thank you for the project. I wonder whether it works if you create a Ribbon button and invoke that code from the Click event. If it doesn't produce this issue, you can use the ADXOlForm.ADXPostMessage() method to create a delay. The delay ends when the ADXOlForm.ADXPostMessageReceived event occurs; run that code in this event.


Andrei Smolin
Add-in Express Team Leader
Posted 28 Jun, 2018 09:52:55 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Paul,

Thank you for the project #2. We can't reproduce the issue using Add-in Express 9.1.4620.

Does the issue occurs when using a Ribbon button? In your code I see this comment: //this.InspectorObj is null. You can try to get the inspector using (this.OutlookAppObj as Outlook.Applicaiton).ActiveInspector().


Andrei Smolin
Add-in Express Team Leader
Posted 29 Jun, 2018 03:40:09 Top