Excel Attachment

C

Cathy

Does anyone know a way to block a file from being attached and emailed in
outlook? I have an excel workbook that my boss does not want emailed out.
Thanks!
 
B

Brian Tillman

Cathy said:
Does anyone know a way to block a file from being attached and
emailed in outlook? I have an excel workbook that my boss does not
want emailed out.

Well, then, simply don't mail it. Surely you control what you include in a
message.
 
V

VanguardLH

in message
Does anyone know a way to block a file from being attached and
emailed in
outlook? I have an excel workbook that my boss does not want emailed
out.
Thanks!


So you want a technical solution to your inability to NOT manually
attach a file to your outbound e-mails? Seems like all your boss
needs to demand is that *YOU* not attach the file. Otherwise, you'll
need to have your mail server strip off attachments. If you cannot
keep yourself from attaching the file, any software or policies
enforced on your host can be circumvent by you, too.
 
M

Michael Bauer [MVP - Outlook]

Additionally to the brilliant suggestions made, this might be helpful as
well. Open the VBA environment and copy the code into ThisOutlookSession and
click Save. You must edit the workbook's name, of course:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
On Error Resume Next
Dim Att As Outlook.Attachment
Dim Attachments As Outlook.Attachments
Dim i&

Set Attachments = Item.Attachments

If Not Attachments Is Nothing Then
For i = 1 To Attachments.Count
Set Att = Attachments.Item(i)
If LCase$(Att.FileName) = LCase$("yourWorkbookNameHere.xls") Then
Cancel = True
MsgBox "Remember? Don't send " & Att.FileName & "!"
Exit For
End If
Next
End If
End Sub

--
Best regards
Michael Bauer - MVP Outlook
Use Outlook Categories? This is Your Tool:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 13 Feb 2008 11:59:04 -0800 schrieb Cathy:
 
Top