Hi guys, I have this email application and i would like to put an IF sttement in it in the myMail.HTMLBody. How do you do that.
this bit from the code below gives an error, it says 'Syntax error':
& if Recordsettest("ID") = 123 then writethis end if &
Thanks for any inputs.
code:
.
.
Set myMail=CreateObject("CDO.Message")
myMail.Subject=Recordsettest("Subject")
myMail.From="fromMe@mysitetest.com"
myMail.To="toMe@mysitetest.com"
myMail.HTMLBody = "Dear Sir,<p>According to my records the above record which is held on database is due for review by " & DoDateTime(Recordsettest("tillnextreview").Value , 2, 2057) & ", and in line with our quality assurance process I am informing you at least 2 months in advance.<br>The item can be viewed via the link below.<p><a href= & Recordsettest("ID") & "> & Recordsettest("ID") & "</a> <p><br>" & if Recordsettest("ID") = 123 then writethis end if & "Please supply me with a new review date."
.
.
.
.
this bit from the code below gives an error, it says 'Syntax error':
& if Recordsettest("ID") = 123 then writethis end if &
Thanks for any inputs.
code:
.
.
Set myMail=CreateObject("CDO.Message")
myMail.Subject=Recordsettest("Subject")
myMail.From="fromMe@mysitetest.com"
myMail.To="toMe@mysitetest.com"
myMail.HTMLBody = "Dear Sir,<p>According to my records the above record which is held on database is due for review by " & DoDateTime(Recordsettest("tillnextreview").Value , 2, 2057) & ", and in line with our quality assurance process I am informing you at least 2 months in advance.<br>The item can be viewed via the link below.<p><a href= & Recordsettest("ID") & "> & Recordsettest("ID") & "</a> <p><br>" & if Recordsettest("ID") = 123 then writethis end if & "Please supply me with a new review date."
.
.
.
.