User5590
User5590

Reputation: 1435

Outlook Property Accessor error: The property "ttp://schemas.microsoft.com/mapi/proptag/0x7FFE000B" is unknown or cannot be found

I'm using the Outlook property accessor to email attachments. This is the Code that I'm using:

 //check whether attachments are there or not
                            if (mailItem.Attachments.Count > 0)
                            {
                                //loop through all attachments
                                for (int j = 1; j <= mailItem.Attachments.Count; j++)
                                {
                                    //check if attachment is email attachment, then only save to local directory
                                    if (mailItem.Attachments[j].PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x7FFE000B") == false)
                                    {
                                        //save email attachment to local directory
                                        mailItem.Attachments[j].SaveAsFile
                                            (attachmentPath + "\\" +
                                            mailItem.Attachments[j].FileName);
                                    }
                                }
                            }

It's reading fine for most of the emails, but for a couple of them, I get this error:

The property "ttp://schemas.microsoft.com/mapi/proptag/0x7FFE000B" is unknown or cannot be found.

I want to know what's the fix for this error and if there are any workarounds if the error is thrown?

Upvotes: 0

Views: 1343

Answers (1)

Eugene Astafiev
Eugene Astafiev

Reputation: 49395

It is not the required property for attachments, i.e. not all attachments will have that property set.

The DASL property name corresponds to the PR_ATTACHMENT_HIDDEN property tag. It indicates whether an attachment is hidden from the end user.

Upvotes: 1

Related Questions