Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Prevent sending Excel files as attachements (http://www.outlookbanter.com/outlook-vba/98949-prevent-sending-excel-files-attachements.html)

kurthh January 13th 10 07:32 AM

Prevent sending Excel files as attachements
 
Hello

I use Outlook 2003 as my email program.
Unfortunately, I have sent some Excel files as an attachment, which
would not have been sent out.
Is it possible to use a macro to prevent Outlook from sending if the
email contains an Excel File

thanks

Kurt

Michael Bauer [MVP - Outlook] January 13th 10 08:16 AM

Prevent sending Excel files as attachements
 


in the ItemSend event check the Attachments collection for the item. For
each attachment in that collection check the Filename property. If there's
one that ends with ".xls" or the like, set Cancel = True.

--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
http://www.vboffice.net/product.html?pub=6&lang=en


Am Tue, 12 Jan 2010 23:32:51 -0800 (PST) schrieb kurthh:

Hello

I use Outlook 2003 as my email program.
Unfortunately, I have sent some Excel files as an attachment, which
would not have been sent out.
Is it possible to use a macro to prevent Outlook from sending if the
email contains an Excel File

thanks

Kurt



All times are GMT +1. The time now is 03:35 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com