View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Michael McClellan Michael McClellan is offline
external usenet poster
 
Posts: 15
Default If statement to send email

Want to give this one a try?

Why does all email get sent to and never to


If (Range("A7").Value = "D") Then
.To = "
Else
.To = "
End If
.CC = ""
.BCC = ""
.Subject = "ORDER ENTERED: " & CurrDir
.Body = "Hi there. Your order: " & CurrDir & " has been
entered." & vbNewLine & _
"This is an automatically generated message. GET
MORE ORDERS!"
'.Attachments.Add ActiveWorkbook.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With