![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I would like to write a VBA tool to strip attachments from emails in Sent
Items. The goal is to clean up mailboxes of users who email many large attachments (a policy is eventually on its way). However, I cannot seem to differentiate between an "external" attachment like a Word document and a small bitmap image (e.g., screen capture) embedded into the body of the email for illustrative purposes. I would like to leave embedded images intact and strip what I'm calling "true" attachments. Is there any way to differentiate between them? My code looks at objItem.Attachments.Count and then calls Remove( ). But the first message it fired on as I tested had only a small embedded graphic. I could test for items with Size (some-number) but that's rather unsatisfying. Thanks for any ideas, Bill Le May |
#2
|
|||
|
|||
![]()
Embedded HTML images have PR_ATTACH_CONTENT_ID property set. HTML body
refers to these images in the img src="cid:xyz"... tag (where xyz is the value of the PR_ATTACH_CONTENT_ID). You can access that property using Extended MAPI, CDO 1.21 or Redemption (but not the Outlook Object Model). Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Bill" wrote in message ... I would like to write a VBA tool to strip attachments from emails in Sent Items. The goal is to clean up mailboxes of users who email many large attachments (a policy is eventually on its way). However, I cannot seem to differentiate between an "external" attachment like a Word document and a small bitmap image (e.g., screen capture) embedded into the body of the email for illustrative purposes. I would like to leave embedded images intact and strip what I'm calling "true" attachments. Is there any way to differentiate between them? My code looks at objItem.Attachments.Count and then calls Remove( ). But the first message it fired on as I tested had only a small embedded graphic. I could test for items with Size (some-number) but that's rather unsatisfying. Thanks for any ideas, Bill Le May |
#3
|
|||
|
|||
![]() "Dmitry Streblechenko" wrote in message ... Embedded HTML images have PR_ATTACH_CONTENT_ID property set. HTML body refers to these images in the img src="cid:xyz"... tag (where xyz is the value of the PR_ATTACH_CONTENT_ID). You can access that property using Extended MAPI, CDO 1.21 or Redemption (but not the Outlook Object Model). Thank you for your reply. I have Redemption, but I am uncertain how to access this property. If I cycle through the Attachments in a SafeMailItem, how would I determine whether they have this property set? My goal is to delete only the non-embedded attachments. Thanks, Bill Le May |
#4
|
|||
|
|||
![]()
You can access them using Attachment.Fields(PR_ATTACH_CONTENT_ID) where
PR_ATTACH_CONTENT_ID is 0x3712001e Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Bill" wrote in message ... "Dmitry Streblechenko" wrote in message ... Embedded HTML images have PR_ATTACH_CONTENT_ID property set. HTML body refers to these images in the img src="cid:xyz"... tag (where xyz is the value of the PR_ATTACH_CONTENT_ID). You can access that property using Extended MAPI, CDO 1.21 or Redemption (but not the Outlook Object Model). Thank you for your reply. I have Redemption, but I am uncertain how to access this property. If I cycle through the Attachments in a SafeMailItem, how would I determine whether they have this property set? My goal is to delete only the non-embedded attachments. Thanks, Bill Le May |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Emails always have .htm attachments | Dave Richardson | Outlook Express | 4 | December 19th 06 06:03 PM |
Stripping Attachments from sent emails? | Ken | Outlook Express | 2 | August 9th 06 04:11 PM |
Why are emails all attachments | HotRod | Outlook - General Queries | 2 | August 1st 06 02:58 PM |
Multi emails sent with attachments | golfer | Outlook Express | 1 | May 7th 06 02:00 PM |
Almost all emails are coming as attachments. | Shirley Azvedo | Outlook Express | 6 | May 2nd 06 10:27 AM |