dmuzial
07-01-2011, 08:22 AM
Hey Everyone!
So I'm horrible with making sure that I have attached documents to my emails, so a friend passed on the following code so I can set up that verification.
Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Item.Attachments.Count = 0 And InStr(1, Item.Body, "attach", vbTextCompare) Then
If MsgBox("It appears that an item should be attached" + vbLf + "to this message, but no item is attached." + vbLf + vbLf + "Do you still want to send this message?", vbYesNo, "Continue sending?") = vbNo Then
Cancel = True
End If
End If
End Sub
I ran through it and from what I can tell, everything looks right. But whenever I try to set it up, it won't pop up under my macros tab.
Did I type something incorrectly?
So I'm horrible with making sure that I have attached documents to my emails, so a friend passed on the following code so I can set up that verification.
Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
If Item.Attachments.Count = 0 And InStr(1, Item.Body, "attach", vbTextCompare) Then
If MsgBox("It appears that an item should be attached" + vbLf + "to this message, but no item is attached." + vbLf + vbLf + "Do you still want to send this message?", vbYesNo, "Continue sending?") = vbNo Then
Cancel = True
End If
End If
End Sub
I ran through it and from what I can tell, everything looks right. But whenever I try to set it up, it won't pop up under my macros tab.
Did I type something incorrectly?