Never Forget an Outlook Email Attachment Again...

Simple Macros You Can Use to Remind You to Insert Your Attachment...

Y! Eric
In Outlook, you can write scripts called "macros" that can do things for you at designated events, sort of like an advanced Outlook rule. This macro will check your message every time that you hit send for a word containing "attach" (i.e., attached, attachment, etc.) in it. If it finds one of these words and you forgot to attach a file, it will remind you to attach a file before it gets sent.

I've attached the macro code, so let me know if you need any help adding the macro to your Outlook!

Go to Tools > Macro > Visual Basic Editor > Project1 > Microsoft Office Outlook > ThisOutlookSession > 'Paste the code below in the open dialog box'). Just hit Save and exit out of all open boxes. That's it.....

Try it out.....

CODE STARTS BELOW (Just COPY and PASTE):

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim m As Variant
Dim strBody As String
Dim intIn As Long
Dim intAttachCount As Integer, intStandardAttachCount As Integer

On Error GoTo handleError

'Edit the following line if you have a signature on your email that includes images or other files. Make intStandardAttachCount equal the number of files in your signature.
intStandardAttachCount = 2

strBody = LCase(Item.Body)

intIn = InStr(1, strBody, "original message")

If intIn = 0 Then intIn = Len(strBody)

intIn = InStr(1, Left(strBody, intIn), "attach")

intAttachCount = Item.Attachments.Count

If intIn > 0 And intAttachCount m = MsgBox("It appears that you mean to send an attachment," & vbCrLf & "but there is no attachment to this message." & vbCrLf & vbCrLf & "Do you still want to send?", vbQuestion + vbYesNo + vbMsgBoxSetForeground)

If m = vbNo Then Cancel = True

End If

handleError:

If Err.Number 0 Then
MsgBox "Outlook Attachment Reminder Error: " & Err.Description, vbExclamation, "Outlook Attachment Reminder Error"
End If

End Sub

Published by Y! Eric

Works out of NY office in developing potential advertiser target list and initiates contact with potential AC customers. Researches partner needs and proposes custom Associated Content advertising solutions...  View profile

2 Comments

Post a Comment
  • TOMCAT1/14/2010

    Eric,

    VBS gives me an error on this line:
    If intIn > 1 And intAttachCount m = MsgBox("It appears that you mean to send an attachment," & vbCrLf & "but there is no attachment to this message." & vbCrLf & vbCrLf & "Do you still want to send?", vbQuestion + vbYesNo + vbMsgBo

    Let me know what could be wrong.

  • AC_Darnell9/10/2008

    I had no idea that was possible. Uploading that code right now.

Displaying Comments

To comment, please sign in to your Yahoo! account, or sign up for a new account.