Outlook Attachment Reminder Macro
How to set it up:
1. Open Outlook.
2. Press Alt+F11 : This will open the Visual Basic editor.
3. Expand the project until you find “ThisOutlookSession” and select it.
4. Copy the code below into the Visual Basic code window.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim lngres As Long
If InStr(1, Item.Body, "attach") Or InStr(1, Item.Subject, "attach") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("word 'Attach' found, but no attachment - send anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
If InStr(1, Item.Body, "include") Or InStr(1, Item.Subject, "include") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("word 'include' found, but no attachment - send anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
If InStr(1, Item.Body, "enclose") Or InStr(1, Item.Subject, "enclose") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("word 'Enclose' found, but no file enclosed - send anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
End Sub
Dim lngres As Long
If InStr(1, Item.Body, "attach") Or InStr(1, Item.Subject, "attach") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("word 'Attach' found, but no attachment - send anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
If InStr(1, Item.Body, "include") Or InStr(1, Item.Subject, "include") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("word 'include' found, but no attachment - send anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
If InStr(1, Item.Body, "enclose") Or InStr(1, Item.Subject, "enclose") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("word 'Enclose' found, but no file enclosed - send anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion + vbSystemModal, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
End Sub
5. Save.
Now to test:
6. Close & Reopen Outlook for good measure.
7. Write an email containing the word attach.
8. Click send. *This is when you should get the pop-up.
7. Write an email containing the word attach.
8. Click send. *This is when you should get the pop-up.
How to set it up:
1. Open Outlook.2. Press Alt+F11 : This will open the Visual Basic editor.
3. Expand the project until you find “ThisOutlookSession” and select it.
4. Copy the code below into the Visual Basic code window.
5. Save.
Now to test:
6. Close & Reopen Outlook for good measure.
7. Write an email containing the word attach.
8. Click send. *This is when you should get the pop-up.
- See more at: http://www.businesshut.com/outlook-macros/outlook-attachment-reminder-macro/#sthash.F0RRLyFo.dpuf
How to set it up:
1. Open Outlook.2. Press Alt+F11 : This will open the Visual Basic editor.
3. Expand the project until you find “ThisOutlookSession” and select it.
4. Copy the code below into the Visual Basic code window.
5. Save.
Now to test:
6. Close & Reopen Outlook for good measure.
7. Write an email containing the word attach.
8. Click send. *This is when you should get the pop-up.
- See more at: http://www.businesshut.com/outlook-macros/outlook-attachment-reminder-macro/#sthash.F0RRLyFo.dpuf