MAPI message attachments - embedded vs attached

I have a program that imports msg files and uses PR_HASATTACH to determine if there are attachments. (I need to set a boolean in a table if there are attachments or not.)

The problem is that if there is an embedded image (like a logo), that property is set to true.  Is there a way to determine the difference between embedded images and true attachments to the message?

I've also looked at PR_MESSAGE_ATTACHMENTS and that is also populated with embedded images/items, so that doesn't help me either.
bjones8888PresidentAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yarwellCommented:
As email is a text only medium surely any image is by definition an attachment ?
0
bjones8888PresidentAuthor Commented:
I found the solution.  Embedded images (or "inline" images) have a value set for the PR_ATTACH_CONTENT_ID or PR_ATTACH_CONTENT_ID_W property of the attachment.  So first I have to obtain the attachment collection, and read this property on each attachment.  If it has a value, then it is an inline or embedded image (its purpose is to tell the email client where in the message body to display the image).  If the value of that property is MAPI_E_NO_FOUND, then it is an attached item.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bjones8888PresidentAuthor Commented:
I found the answer myself.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Outlook

From novice to tech pro — start learning today.