F
fruitchunk
I had this code in Outlook 2003 it warned me when I sent email without
attachment if it found the word attached in the email.
It doesn't work in Outlook 2007, please help. Thanks.
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(" Found 'Attach' in message, but no attachment found - send
anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
End Sub
attachment if it found the word attached in the email.
It doesn't work in Outlook 2007, please help. Thanks.
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(" Found 'Attach' in message, but no attachment found - send
anyway?", _
vbYesNo + vbDefaultButton2 + vbQuestion, "You asked me to warn you...")
If lngres = vbNo Then Cancel = True
End If
End If
End Sub