A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Outlook 2007 AddIn: Filter attachments by type



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 12th 09, 10:53 AM posted to microsoft.public.outlook.program_addins
Derick Swart
external usenet poster
 
Posts: 10
Default Outlook 2007 AddIn: Filter attachments by type

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

Ads
  #2  
Old March 12th 09, 03:47 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Outlook 2007 AddIn: Filter attachments by type

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" wrote in message
news
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


  #3  
Old March 13th 09, 07:02 AM posted to microsoft.public.outlook.program_addins
Derick Swart
external usenet poster
 
Posts: 10
Default Outlook 2007 AddIn: Filter attachments by type

Hectic!

Thanks Ken.

"Ken Slovak - [MVP - Outlook]" wrote in message
...
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" wrote in message
news
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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast object of type 'System.__ComObject' to type 'Microsoft.Office.Interop.Outlook.ApplicationClass' John Yovas Add-ins for Outlook 2 September 12th 08 04:23 PM
[VSTO] Addin to prohibit to add attachments Mercier Outlook and VBA 3 September 11th 08 07:14 PM
Can't open attachments of type MSG John Outlook - General Queries 3 April 11th 08 07:34 PM
Rejected by POST filter? can't send attachments? Gabe Grall Outlook - General Queries 4 February 1st 08 09:51 PM
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Outlook.ContactItem'. Dhananjay Outlook and VBA 3 October 13th 07 07:56 AM


All times are GMT +1. The time now is 09:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.