Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / New Users / February 2006

Tip: Looking for answers? Try searching our database.

Get the CID from Attachment Filename

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chris - 22 Feb 2006 19:44 GMT
I am trying to determine if one of my attachments from an Outlook
message is an embedded Image in the HTML Body of this message.

I am using the Outlook Object Model and I have a component that
extracts the CDO Properties of any message that I pass it.

I basically extract the HTMLBody of the message, then iterate through
each of the attachments and look to see if this attachment is part of
the HTMLBody of the message.

If it is I leave it alone. If Not I extract the Attachment. - this is
the key as I am ultimately trying to extract the Items that are NOT in
the HTML

I have so far determined that I can look for a number of things in the
HTML Body such as:

src="cid:filename.gif",
<IMG SRC=Filename.gif ....
src="http://....../Filename.gif"

BUT when I have an attached file whose name is "boomerang.gif" for
example, and I look at the HTMLBody to see if it exists, I do not find
a match!!

Instead I notice that I have this:

background=cid:939452716@06042005-1C1A

Where 939452716@06042005-1C1A should be "boomerang.gif"?!?!

I am also aware that the internet header of the message can sometimes
contain Information about the embedded images (Content-Type and
Content-ID), but in my case I have an email that has no Header.

Can anyone help me on this?

Ideally I would like to take the Filename of the attachment and
discover if the Message has a content ID for it.

HELP!!

Thanks
Ken Slovak - [MVP - Outlook] - 23 Feb 2006 14:56 GMT
The original HTML can be rewritten by Outlook. The worst if you actually
study the HTML is if a message is part of a thread and the messages going
back and forth are moving between the Outlook editor and WordMail. That's a
real mess.

If you open the attachments table and look at each attachment you can see
how it was attached from the PR_ATTACH_METHOD property (PT_LONG,
0x37050003).

ATTACH_BY_VALUE = 1, etc. Same values as the Attachment.Type value you get
from the Outlook object model. Avoid olEmbeddeditem (5).

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

>I am trying to determine if one of my attachments from an Outlook
> message is an embedded Image in the HTML Body of this message.
[quoted text clipped - 39 lines]
>
> Thanks
chris - 27 Feb 2006 19:33 GMT
Thanks Ken, I will give this a go and let you know how it works out :)
regards,

Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.