I've been reading on KC on Exchange & Outlook and came across a really cool post on a little macro you can write within Outlook to make sure you don't forget to attach files. The simple version (which of course you can customize to suite your own typing style) is here:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim lngres As Long
If InStr(1, Item.Body, "attach") <> 0 Then
If Item.Attachments.Count = 0 Then
lngres = MsgBox("'Attach' in body, but no attachment - send anyway?",
vbYesNo + vbDefaultButton2 + vbQuestion,
"You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
End Sub
Of course you'll have to know where to place this macro
- Start Outlook
- Tools | Macros | Security
- Choose “Medium”, which will prompt you on whether or not you want to run macros (VBA). You may need to restart Outlook at this point in order for that setting to take effect.
- Tools | Macros | Visual Basic Editor
- Doubleclick on This Outlook Session on the left, which will open the code window on the right
- In the code window, paste the code
- Optional: View | Immediate to make the immediate window show up
- Put the cursor in the middle of the code you just pasted
- Press F5 to run it
And of course, the source of this wonderful macro is KC, and her blog post is here.
1 comments:
And here is a more verbose version
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=498
Post a Comment