Count The Attachments

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

Count The Attachments
 
BerndH




Posts: 99
Joined: 2014-09-23
Hi,
I want to count the attachments (e.g. the user can only send 5 attachments).
For this I use
public override void ProcessAttachmentRemove(object attachment)
and
public override void ProcessAttachmentAdd

But the "ProcessAttachmentRemove" is never fired?
Am I wrong? Can you help me?

Bernd
Posted 05 May, 2022 05:48:37 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello Bernd,

The MailItem.AttachmentRemove event doesn't fire for me on an email being composed. This also occurs in a test project written in VBA.

I suggest that you check the number of attachments in the ItemSend event - it is mapped to the ItemSend event of the Outlook Events component: if the number exceeds the limit, you can cancel the event and this cancels the send operation.

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 06 May, 2022 04:11:14 Top
BerndH




Posts: 99
Joined: 2014-09-23
Okay,
thanks.
That works for me :-)
Posted 06 May, 2022 07:03:32 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
You are welcome!

Regards from Poland (CEST),

Andrei Smolin
Add-in Express Team Leader
Posted 06 May, 2022 09:38:26 Top