I am seeing what appears to be a recent change in behavior with Outlook 365 desktop and the Outlook API. It looks like MailItem.Attachments does not see any attachments inside the compose window for a message that is being forwarded.
Has anyone else seen this and is it a known issue that will be fixed?
I am seeing what appears to be a recent change in behavior with Outlook 365 desktop and the Outlook API. It looks like MailItem.Attachments does not see any attachments inside the compose window for a message that is being forwarded.
Has anyone else seen this and is it a known issue that will be fixed?
Share Improve this question edited Mar 26 at 13:03 Dmitry Streblechenko 66.5k4 gold badges55 silver badges83 bronze badges asked Mar 25 at 17:33 Al_CAl_C 135 bronze badges 4- I cannot reproduce that behavior. Please show the code that accesses the attachments. – Dmitry Streblechenko Commented Mar 26 at 13:04
- Thank you, Dmitry. I actually found that it is not any problem with the API. It's a new line of code using an extended property for detecting whether an attachment is actually an embedded image in a message. That extended property was returning a value when it should not have and so I was skipping that attachment. – Al_C Commented Mar 26 at 19:37
- Just to further clarify if it's useful. PropertyAccessor.GetProperty("schemas.microsoft/mapi/proptag/0x3712001F") is coming back with a string on regular file attachments that were already present in a mail message that I then decide to forward. When the compose item for forwarding comes up and I try to distinguish between real file attachments and embedded image attachments, this property is returning a string even for the real file attachment AND the embedded image attachments. So I added some checking of the HTML body to see if there are any associate cid: occurrances. – Al_C Commented Mar 27 at 16:34
- I will continueas an answer to the question – Dmitry Streblechenko Commented Mar 28 at 0:15
1 Answer
Reset to default 0You should never use PR_ATTACH_CONTENT_ID
as an indication that an attachment in question is referenced by the HTML body. You can check whether the attachment is referenced by an img
tag in HTML body or check the PR_ATTACH_FLAGS
property ( does not always work) - see if ATT_MHTML_REF
flag is set.