Intercept attachments from the Recent Items menu

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

Intercept attachments from the Recent Items menu
Microsoft Outlook 
Subscribe
Reggie




Posts: 12
Joined: 2022-03-22
Good afternoon,

I have a problem when I try to insert attachments to my mailitem from the Recent Items menu.

Intercepting attachments from the "Browse this PC" is possible, but there seems to be no way to intercept attachments when selecting a file from the Recent Items menu.

We are using Add-in Express Regions for Microsoft Outlook and VSTO.

I hope someone can help me out with this issue because it's very urgent.

Kind regards,

Reggie
Posted 21 Nov, 2022 10:37:25 Top
Andrei Smolin


Add-in Express team


Posts: 18515
Joined: 2006-05-11
Hello Reggie,

Try to use the Mailitem.BeforeAttachmentAdd event. It allows you to check the attachment being added and cancel the process.

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 21 Nov, 2022 12:06:50 Top
Reggie




Posts: 12
Joined: 2022-03-22
Hi Andrei,

Thanks for replying!

The problem is when my attachment is larger than what Outlook allows, Outlook throws an error.
There seems no way to catch this error. And if I cancel the process with BeforeAttachmentAdd event, I catch all attachment events and I only want to intercept attachments added by the Recent Items menu.

Thanks in advance!

Reggie
Posted 22 Nov, 2022 03:50:00 Top
Andrei Smolin


Add-in Express team


Posts: 18515
Joined: 2006-05-11
Hello Reggie,

The problem is when my attachment is larger than what Outlook allows, Outlook throws an error.
There seems no way to catch this error.


There’s nothing in the Outlook object model to help you with this.

and I only want to intercept attachments added by the Recent Items menu.


I don’t see a way to solve this. I think there’s no such way.

Regards from Poland (GMT+1),

Andrei Smolin
Add-in Express Team Leader
Posted 23 Nov, 2022 09:35:51 Top