PC Review


Reply
Thread Tools Rate Thread

Outlook 2007 AddIn: Filter attachments by type

 
 
Derick Swart
Guest
Posts: n/a
 
      12th Mar 2009
Good day,

I have an Outlook 2007 AddIn that posts attachments to a document server.
The issue that that not only "real" attachments are posted, but also
signatures and other images that are attached. Is there a way to filters
these out?

Thanks,
Derick

 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      12th Mar 2009
You will have to use the PropertyAccessor object on each attachment to look
for properties not exposed to the object model to be sure. One property to
look at is AttachmentType, if that is 6 (ATTACH_OLE) then it's an embedded
attachment. If that's not 6 however it still could be an embedded
attachment. It could be 1 (ATTACH_BY_VALUE) and still could be embedded.

So, you have to check for PR_ATTACH_CONTENT_ID and see if it's there. If it
is there it's an embedded attachment. When you get the PropertyAccessor
object use its GetProperty() method with the following DASL string property
tag: "urn:schemas:mailheader:content-id"

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Derick Swart" <(E-Mail Removed)> wrote in message
news348212B-9488-4C78-AA7F-(E-Mail Removed)...
> Good day,
>
> I have an Outlook 2007 AddIn that posts attachments to a document server.
> The issue that that not only "real" attachments are posted, but also
> signatures and other images that are attached. Is there a way to filters
> these out?
>
> Thanks,
> Derick


 
Reply With Quote
 
 
 
 
Derick Swart
Guest
Posts: n/a
 
      13th Mar 2009
Hectic!

Thanks Ken.

"Ken Slovak - [MVP - Outlook]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You will have to use the PropertyAccessor object on each attachment to
> look for properties not exposed to the object model to be sure. One
> property to look at is AttachmentType, if that is 6 (ATTACH_OLE) then it's
> an embedded attachment. If that's not 6 however it still could be an
> embedded attachment. It could be 1 (ATTACH_BY_VALUE) and still could be
> embedded.
>
> So, you have to check for PR_ATTACH_CONTENT_ID and see if it's there. If
> it is there it's an embedded attachment. When you get the PropertyAccessor
> object use its GetProperty() method with the following DASL string
> property tag: "urn:schemas:mailheader:content-id"
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
> http://www.slovaktech.com/products.htm
>
>
> "Derick Swart" <(E-Mail Removed)> wrote in message
> news348212B-9488-4C78-AA7F-(E-Mail Removed)...
>> Good day,
>>
>> I have an Outlook 2007 AddIn that posts attachments to a document server.
>> The issue that that not only "real" attachments are posted, but also
>> signatures and other images that are attached. Is there a way to filters
>> these out?
>>
>> Thanks,
>> Derick

>


 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying a derived type to another type that inherits from derived type Bob Jones Microsoft C# .NET 3 2nd Jul 2007 02:47 PM
Filter Filter Filter =?Utf-8?B?YW1zdXJpYQ==?= Microsoft Access Form Coding 5 28th Nov 2006 11:37 AM
find out if an instance of type type (indirectly) derives from another type bonk Microsoft C# .NET 8 20th Sep 2006 02:51 PM
email properties, email type, custom type or internet type? =?Utf-8?B?UmFuZHlCOTk5?= Microsoft Outlook Contacts 0 21st Jun 2005 07:01 PM
Add more type to Journal type entries under the entry type drop down list? msw Microsoft Outlook Discussion 1 7th Jan 2005 03:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:19 AM.