![]() |
How to determine if an attactment is hidden?
Hi
I am saving attachents from incomming email. This works OK. The problem is that it also saved hidden attachemnts like logo's etc. I have found a similiar problem on this newsgroup, but I don't quite manage to make it work. I have startet coding, and made the stuff below. The "realAttc" boolean variable always return true, no matter what email I examine. I have inserted the following values, but is this correct:? PR_ATTACHMENT_HIDDEN = sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H7FFE000B) Or PT_BOOLEAN For me it seems like it just tests the whole email item, and not every single attachment.? As you can see I am bit confused, so any code snippet, or hint would be appriciated. Set sItem = CreateObject("Redemption.SafeMailItem") If sItem Is Nothing Then AttachedFiles = 999 Else sItem.Item = myEmailItem PR_ATTACHMENT_HIDDEN = sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H7FFE000B) Or PT_BOOLEAN realAttc = sItem.Fields(PR_ATTACHMENT_HIDDEN) End If Kind regards Karsten Markmann |
How to determine if an attactment is hidden?
That property simply hides the attachment icon from the message list view in
Outlook. To hide a particular attachment from the Outlook UI, you need to set the PR_ATTACHMENT_HIDDEN (0x7FFE000B) property on that attachment (Attachment.Fields). That probably will be set by Outlook on the outgoing message, but most likely it will not be present on the incoming messages. To check whether an attachment is really an embedded HTML image, read the PR_ATTACH_CONTENT_ID (0x3712001E) property and (if you really need to be 100% sure), check to see if there is an img tag in the message HTML body that has the "src=cid:..." attribute with the same value (if PR_ATTACH_CONTENT_ID = "xyz", src attribute will be src=cid:xyz) Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "Karsten_Markmann" wrote in message ps.com... Hi I am saving attachents from incomming email. This works OK. The problem is that it also saved hidden attachemnts like logo's etc. I have found a similiar problem on this newsgroup, but I don't quite manage to make it work. I have startet coding, and made the stuff below. The "realAttc" boolean variable always return true, no matter what email I examine. I have inserted the following values, but is this correct:? PR_ATTACHMENT_HIDDEN = sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H7FFE000B) Or PT_BOOLEAN For me it seems like it just tests the whole email item, and not every single attachment.? As you can see I am bit confused, so any code snippet, or hint would be appriciated. Set sItem = CreateObject("Redemption.SafeMailItem") If sItem Is Nothing Then AttachedFiles = 999 Else sItem.Item = myEmailItem PR_ATTACHMENT_HIDDEN = sItem.GetIDsFromNames("{00062008-0000-0000-C000-000000000046}", &H7FFE000B) Or PT_BOOLEAN realAttc = sItem.Fields(PR_ATTACHMENT_HIDDEN) End If Kind regards Karsten Markmann |
All times are GMT +1. The time now is 06:11 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com