I'm not a programmer, just a little geek, but I'm trying to build up a vb script for a mailing software I use. It should write in the body of the email something depending on the non-numerical values present in two fields of the records of the various contacts, "company" (so, the company name) and "category". What I exactly need is that if the company name is unknown, it just writes nothing but if it is known, then if the category is VENUE, then it writes down "at " but if it is whatever else category, it writes down "with ". Here is what I'm trying but, naturally, it's not working. Thanks in advance for your help!
if Contact.Field("company") = "" Then
document.write("")
Else
if Contact.Field("category") = "VENUE" Then
document.write("at " & Contact.Field("company"))
if Contact.Field("category") = "INSTITUTION" Then
document.write("with " & Contact.Field("company"))
if Contact.Field("category") = "ASSOCIATION" Then
document.write("with " & Contact.Field("company"))
if Contact.Field("category") = "EV.ORG." Then
document.write("with " & Contact.Field("company"))
if Contact.Field("category") = "AGENCY" Then
document.write("with " & Contact.Field("company")