|
|
|
date: Fri, 29 Feb 2008 13:02:14 +0545,
group: microsoft.public.platformsdk.mapi
back
Re: How to distinguish General Attachment and Embedded Attachment
Another way is for RTF e-mails, if the attachment is an IStorage attachment,
you can get the IStorage interface on the attachment, get the CLSID, then
query the HKEY_CLASSES_ROOT\CLSID\{clsid}\MiscStatus key. It's a bitflag.
If it has OLEMISC_STATIC, then its a static graphic like a picture and
shouldn't be considered an "attachment" in the traditional sense.
Once you get the CLSID from the IStorage object via ReadClassStg(), call
CoGetTreatAsClass() first just in case the original e-mail's CLSID has been
replaced with a newer object version.
Robert
"Dmitry Streblechenko" wrote in message
news:%23iB6qcifIHA.5900@TK2MSFTNGP02.phx.gbl...
> Sometimes (older versions of Outlook) PR_ATTACH_CONTENT_LOCATION is also
> used.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "miztaken" wrote in message
> news:u1RdE2SfIHA.2000@TK2MSFTNGP03.phx.gbl...
>> Hi there,
>> I used CONTENT_ID property along with PR_ATTACH_FLAGS pp3 to distinguish
>> these.
>> Is this correct or there is other way around.
>>
>>
>>
>> "miztaken" wrote in message
>> news:eGKYvLqeIHA.4744@TK2MSFTNGP06.phx.gbl...
>>> Hi everyone,
>>>
>>> I was just curious about how to distinguish General Attachment (the
>>> attachment that displays as a attachment) and Embedded Attachment (the
>>> attachment that gets displayed in Body Field of a message).
>>>
>>> Till now i have only found that:-
>>>
>>> If a message contains only embedded attachment then "HideAttachments"
>>> flag of IMESSAGE is set true.
>>> If a message contains only general attachment then i cant see that flag,
>>> may be its set false.
>>>
>>> But for MESSAGE with both kind of attachments its set invisible here
>>> too,
>>> here too it might be FALSE.
>>>
>>> Also for attachment properties
>>> PR_ATTACHMENT_FLAGS and PR_ATTACH_FLAGS are set 8 and 4 for Embedded
>>> Attachments while they are set to zero for regular attachments.
>>> Can i use this flag to distinguish between embedded and general
>>> attachment.
>>> If not how can i know if attachment is general or embedded one?
>>>
>>> Also is there any flag in MESSSAGE object from which we can know if the
>>> message contains Embedded attachment or general attachment or BOTH?
>>>
>>> I have used Outlook Spy for inspection till now and BTW it expired just
>>> today.
>>>
>>> Poor Meh
>>>
>>> Thank You
>>> miztaken
>>>
>>>
>>>
>>
>>
>
>
date: Tue, 4 Mar 2008 12:08:46 -0700
author: Robert Simpson ail
|
|