0

The following Outlook macro works perfectly, however, I would like this MsgBox to only appear if the Subject is LIKE 'Fees Due%' OR Subject is LIKE'Status Change%'. Is this possible? @thims

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    If MsgBox("Do you want to continue sending the mail?", vbOKCancel) <> vbOK Then
        Cancel = True
    End If
End Sub

1 Answer 1

0

Enclose your If MsgBox ... with the following:

If InStr(Item.Subject, "Fees Due") = 1 Or InStr(Item.Subject, "Status Change") = 1 Then
    ...
End If

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .