PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Redemption Outlook Question2

Reply

Redemption Outlook Question2

 
Thread Tools Rate Thread
Old 03-05-2004, 10:07 PM   #1
Xcelsoft
Guest
 
Posts: n/a
Default Redemption Outlook Question2


Many thanks Dmitry for your response to my earlier
question regarding inserting a jpeg file into the body of
an email message.

Your references were exactly what I was looking for. I
just have one question. I am using the code below which
works fine but that are some parts that I am trying to
understand. I can understand the reason for hidding the
paper clip, defining the attachment, and content type.
What I don't understand is the Attachment CID. What is
the purpose, can you shed some light???

Thanks

'tell Outlook to hide the paperclip icon

Dim PT_BOOLEAN
PT_BOOLEAN = 11
Dim PR_HIDE_ATTACH
PR_HIDE_ATTACH = objSafeMail.GetIDsFromNames("{00062008-
0000-0000-C000-000000000046}", &H8514) Or PT_BOOLEAN
objSafeMail.Fields(PR_HIDE_ATTACH) = True


'add attachment

Set objOutlookAttach = objSafeMail.Attachments.Add
("c:\temp\MyFile.jpg")


'content type

objOutlookAttach.Fields(&H370E001E) = "image/jpeg"


'Attachment cid

objOutlookAttach.Fields(&H3712001E) = "myident"

objSafeMail.HTMLBody = "<IMG align=baseline border=0
hspace=0 src=cid:myident>"

objSafeMail.Save


'Send

objSafeMail.Send
  Reply With Quote
Old 03-05-2004, 10:19 PM   #2
Dmitry Streblechenko \(MVP\)
Guest
 
Posts: n/a
Default Re: Redemption Outlook Question2

It is the content-id. When HTML is rendered, IE asks Outlook to provide the
file given the content id specified in the img src tag. Outlook finds the
attachment with the given value of CID and returns it to IE.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool


"Xcelsoft" <anonymous@discussions.microsoft.com> wrote in message
news:7c5d01c43152$ac10adb0$a101280a@phx.gbl...
> Many thanks Dmitry for your response to my earlier
> question regarding inserting a jpeg file into the body of
> an email message.
>
> Your references were exactly what I was looking for. I
> just have one question. I am using the code below which
> works fine but that are some parts that I am trying to
> understand. I can understand the reason for hidding the
> paper clip, defining the attachment, and content type.
> What I don't understand is the Attachment CID. What is
> the purpose, can you shed some light???
>
> Thanks
>
> 'tell Outlook to hide the paperclip icon
>
> Dim PT_BOOLEAN
> PT_BOOLEAN = 11
> Dim PR_HIDE_ATTACH
> PR_HIDE_ATTACH = objSafeMail.GetIDsFromNames("{00062008-
> 0000-0000-C000-000000000046}", &H8514) Or PT_BOOLEAN
> objSafeMail.Fields(PR_HIDE_ATTACH) = True
>
>
> 'add attachment
>
> Set objOutlookAttach = objSafeMail.Attachments.Add
> ("c:\temp\MyFile.jpg")
>
>
> 'content type
>
> objOutlookAttach.Fields(&H370E001E) = "image/jpeg"
>
>
> 'Attachment cid
>
> objOutlookAttach.Fields(&H3712001E) = "myident"
>
> objSafeMail.HTMLBody = "<IMG align=baseline border=0
> hspace=0 src=cid:myident>"
>
> objSafeMail.Save
>
>
> 'Send
>
> objSafeMail.Send



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off