K
Kathleen
Please help if you can,
I am trying to get a MsgBox to display when the word "attachment" is found
in a new message. I cannot seem to get it to "hook" in to the Send Event. I
am missing something here. Macro security is set to Low. This is the code:
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim intRetval As Integer
' Look for the string "attach" in the body of the message
If InStr(UCase(Item.Body), "ATTACH") Then
' See if there is an attachment
If Item.Attachments.Count = 0 Then
' Ask the user whether Send should be canceled
intRetval = MsgBox("You used the word 'attach'. " & _
"Did you mean to include an attachment?", _
vbYesNo)
If intRetval = vbYes Then
Cancel = True
End If
End If
End If
End Sub
Tia,
Kathy
I am trying to get a MsgBox to display when the word "attachment" is found
in a new message. I cannot seem to get it to "hook" in to the Send Event. I
am missing something here. Macro security is set to Low. This is the code:
Private Sub Application_ItemSend(ByVal Item As Object, _
Cancel As Boolean)
Dim intRetval As Integer
' Look for the string "attach" in the body of the message
If InStr(UCase(Item.Body), "ATTACH") Then
' See if there is an attachment
If Item.Attachments.Count = 0 Then
' Ask the user whether Send should be canceled
intRetval = MsgBox("You used the word 'attach'. " & _
"Did you mean to include an attachment?", _
vbYesNo)
If intRetval = vbYes Then
Cancel = True
End If
End If
End If
End Sub
Tia,
Kathy