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
This works best if Outlook is your editor. If Word is your editor, the dialog will pop up behind Word, I believe this is a limitation that cannot be worked around when using VBA. There's probably some fancy way to do it in word VBA though, if anyone figures it out, post it as a comment.
The macro isn’t very smart – i.e. it looks for ‘attach’ anywhere in the body, not just in the text you typed. It can easily be extended to do things like warn if you try to send a message with a blank subject, that sort of thing.