Dim Found As Range
Set Found = Columns("D").Find(what:="computer", LookIn:=xlValues, lookat:=xlPart)
If Found.Value = "computer shopper" Then
With OutMail
.To = mailAddress
.Subject = mailSubject
.Attachments.Add NewWB.FullName
Set Found = NewWB.Sheet1.Columns("D").Find(what:="Computer", LookIn:=xlValues, MatchCase:=False)
If Found.Value = "Computer" Then
.Attachments.Add ("XXX")
End If
.HTMLBody = "<font face='Arial' style='font-size:10pt'>" & mailSalutation & _
"," & "<br><br>" & strbody & "<br>" & Signature
If Range("A2").Value <> "" Then .Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"
End With
With OutMail
.To = mailAddress
.Subject = mailSubject
.Attachments.Add NewWB.FullName
Set Found = NewWB.Sheet1.Columns("D").Find(what:="Computer", LookIn:=xlValues, MatchCase:=False)
If Found Is Nothing Then Exit Sub
If Found.Value = "Computer" Then
.Attachments.Add ("XXX")
End If
.HTMLBody = "" & mailSalutation & _
"," & "" & strbody & "" & Signature
If Range("A2").Value <> "" Then .Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"
End With
With OutMail
.To = mailAddress
.Subject = mailSubject
.Attachments.Add NewWB.FullName
Set Found = NewWB.Sheet1.Columns("D").Find(what:="Computer", LookIn:=xlValues, MatchCase:=False)
If Not Found Is Nothing Then
If Found.Value = "Computer" Then
.Attachments.Add ("XXX")
End If
End If
.HTMLBody = "" & mailSalutation & _
"," & "" & strbody & "" & Signature
If Range("A2").Value <> "" Then .Display
Application.Wait (Now + TimeValue("0:00:02"))
Application.SendKeys "%s"
End With