I am writing an Outlook Addin using AddIn Express.
I use Delphi, anyway the problem relates to everyone writing Outlook AddIns so i include c# in the tags.
var
MItem: _MailItem;
[...]
if OutlookApp.ActiveExplorer.Selection.Item(i).QueryInterface(IID__MailItem, MItem) = 0 then
[...]
this lines fires an exception at customer end. The problem is that if on that customer outlook i try to see the message details (in outlook 2010 i open the message i go on File tab in ribbon and then i click on properties) I got this: .
If I save the problematic message as msg file and i move it to my local outlook (dragging it in some folder so it becomes "one of my emaii messages") I open the properties and i can see the headers.
So somehow there is an issue with that particular Outlook installation. Is it an issue or is it a Outlook setting? I also noticed that there are 3 types of behaviour:
1) message is fine (at my end all messages are "fine", while at customer's end only some of them are fine. By fine I mean: Internet hedaers are complete)
2) message is not perfect (on some messages the internet headers are incoplete, for example Message-ID headers is missing - in this case anyway the above code works)
3) message is bad (no headers as in screenshot and the code fails).
One more thing: sending a message at customer end to the customer address (so sender = reciever) i see that on sent folder the message is "bad" and on inbox the same message is fine.
Can anyone help me shedding some light on this?
Edit: I noticed that at my end even if I see the hedaers the exception still throws. I am even not able to see the exceptino message. This is probably because of addin express (i have the non source code version).