Want to develop an Outlook Add-In to handle Attachment adding

Add-in Express™ Support Service
That's what is more important than anything else

Want to develop an Outlook Add-In to handle Attachment adding
 
Guest


Guest


Hi,

I have approx one years development experience with C# in VS 2003.NET. I have been looking at this product and would like to find out if I can use it to get Outlook 2003 to handle the following event:

When a user tries to attach a file greater than say 10 MB's, they receive an error message and are prevented from attaching the file.

This is to cure a serious flaw in Outlook/Exchange whereby although Exchange attachment limitations can be set they are totally useless because users are still able to attach a file within Outlook, and send it, the file is retained in Sent Items, which is a folder within Exchange:!: Plus our users have a nasty habit of distributing files internally and not using shares.

Please ask me to clarify if you feel I havn't described the problem clearly enought.
Posted 16 Dec, 2005 06:50:19 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi.

I understand what you are speaking about. The fact is that the Outlook Object Model doesn't provide the event you want to handle but there is another event that can be used to implement your idea. I mean the ItemSend event. In this event you can prevent the email from sending if a condition doesn't meet your requirements.
Posted 16 Dec, 2005 07:21:18 Top
Brad Smith




Posts: 49
Joined: 2005-11-22
The item event list has an OnAttachmentAdd event, into which is passed the new Attachment object. It looks like that's not a cancelable event (meaning, you can't prevent the event from completing). But I wonder if you could pop up a message and then delete the new attachment. I haven't played with that particular event much.

Having said that, if it were me I'd probably trap OnSend anyway, and maybe look at the total size of all attachments. That way you can handle the case of somebody sending ten 1Meg attachments or one 10Meg attachment equally well.

Brad.
Posted 16 Dec, 2005 15:19:12 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Brad.

Ok. I will try to develop an example with the OnAttachmentAdd event. I will let you know about results on Monday or Tuesday.
Posted 17 Dec, 2005 11:09:53 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Brad.

You can download the example using the following link:
http://www.add-in-express.com/projects/oladdattachmentexample.zip
Posted 19 Dec, 2005 17:09:50 Top