Hi,

I am using VB to send mails. I am using html body for the same.

My problem is that I am unable to use the IF condition within the body of the mail as it throws up a "Compile Error: Expected Expression" message.

The code is like this, x is some loop parameter:

. HTMLBody = "<Text>" &  _
If Sheets(1).Cells(x,2).Value = "Yes" Then
"Congrats!"
End If & _
"<Remaining Text>"
Can anyone help?