Outlook if statement to see if sent mail is NOT "Arial"
I have the below code running in ThisOutlookSession, it basically loops through each word to see if there's any Arial text. What I need to do is find text that NOT Arial. So I know with an if statement I could use <> or and else step but how can I do it with this current code?
Option Explicit
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim olInsp As Inspector
Dim oDoc As Object
Dim oRng As Object
Dim answer As Long
With oRng.Find
.Font.Name = "Arial"
Do While .Execute
answer = MsgBox("ok cool", vbYesNo)
If answer = vbNo Then Cancel = True
Exit Do
Loop
End With
End With
lbl_Exit:
Set oDoc = Nothing
Set olInsp = Nothing
Set oRng = Nothing
Exit Sub
End Sub
Posted Feb 22, 2016, 5:42 AM UTC
28