I'm looking to get the "Forwarded" status of an Outlook MailItem without triggering the Outlook Object Model Guard in C#. Using:
PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x10820040")
seems to automatically do this. I cannot use Extended MAPI or Redemption as my application has to run in 64 bit, but Outlook may be in 32bit which would cause issues of bitness.
Is there any other way around this?
Turns out looping through Outlook
MailItems is a no no. This was what was causing the Outlook Object Model Guard to be triggered. A much better way to do things is to use theRestrictFindandFindNextmethods. This bypasses the Outlook Object Model Guard completely and serves the same purpose.Further details can be found here from the oracles of Outlook MAPI themselves!:
https://stackoverflow.com/a/74113900/6899267
here:
https://stackoverflow.com/a/71928092/6899267
and here:
https://www.add-in-express.com/creating-addins-blog/retrieve-outlook-tasks-find-findnext/