You need to use CDO 1.21 or Redemption (www.dimastr.com) in order to read
the property in Outlook 2003.

If you're going to use Redemption, see on Dmitry's page how to use the
SafeMailItem object. For the Attachment object derived from
SafeMailitem.Attachments you can read Attachment.Fields(&H3712001E).

Best regards
Michael Bauer - MVP Outlook
: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Fri, 20 Nov 2009 16:44:48 +0100 schrieb Tora:

> Hi all,
>
> I have got Outlook 2003 with an eMail that contains embedded pictures. I
> need to read these eMails and their attachments including the Content ID.
> I did already search the internet for a solution but could not find a
> working solution so far. I do know that at a certain point in the
> attachment there is written PR_ATTACH_CONTENT_ID / 0x3712001E) but I do
> not know how to use this. I really hope that somebody can help me with
> this problem. This is my programmed code that I do test at the moment. I
> did define a special mailbox with folders in Outlook:
>
> Private Function myModerator_OneFolder()
> modname = "test user"
> modmailaddr = "test@intern.local"
> Postfach = "Postfach - Moderator, Mail"
> Verzeichnis = "___Abgelehnt"
> wegschicken = True
> SubjZus = "Mail OK:"
> ErrSubjZus = "Mail NOK:"
>
> Dim fehler, wgfehler, respfehler, readfehler As Boolean
>
> Set Folder =
>
Application.GetNamespace("MAPI").Folders.Item(Postfach).Folders(Verzeichnis)
> Set GesFolder =
>
Application.GetNamespace("MAPI").Folders.Item(Postfach).Folders(Verzeichnis).Folders("Gesendet")
>
>
> For i = Folder.Items.Count To 1 Step -1
> Set from_Item = Folder.Items(i)
> If from_Item.SenderEmailType = "SMTP" Then
>
>
>
> For Each objSAttach In from_Item.Attachments
> ' >>>>>>>>>>>> How can I read out the content ID here?
>
> Next
> End If
>
> Next 'mail
> myModerator_OneFolder = True
> Exit Function
> End Function
>
>
> Big big Thanks for help.
>
> Best regards,
> Tora
20 Nov 2009Get image content ID from MAPI mail.Tora
20 Nov 2009\ Re: Get image content ID from MAPI mail.Michael Bauer [MVP - ...
23 Nov 2009   \ Re: Get image content ID from MAPI mail.Tora
23 Nov 2009      \ Re: Get image content ID from MAPI mail.Michael Bauer [MVP - ...
24 Nov 2009         \ Re: Get image content ID from MAPI mail.Tora
24 Nov 2009            \ Re: Get image content ID from MAPI mail.Michael Bauer [MVP - ...
Contact Us
All times are in (US) Eastern Daylight Time (GMT -4:00)