Hi Tissa,
Some minor changes I would add to the one suggested by Madhu.
1) convert the word template to html template. May be you can name it as template1.txt / template1.asp / template1.csv / template1.html itself
2) insert template variables into html file. You may define tags for this. For e.g. [currentdate] may be one variable. [bookingnumber] may be another variable.
You can as such use ASP variables instead of User defined TAGs.
Eg:
Dear <%=RsObject("FName")%> <%=RsObject("LName")%>,
OR
Response.write "Dear " & RsObject("FName") & " " RsObject("LName") & ","
3) Read the template into a string. using FileSystemObject
4) Now, open database. Traverse through records. If needed, do a response.write of the string read from template, to see if data got substituted in relevant places.
You can avoid doing a replace mentioned in this step, as everything is in place after using ASP variables in the template.
5) For each contact, replace the template variables with appropriate values. The function Replace will be of help in this case.
6) You can set this string as the value of HTMLBody property of cdo object.
Everything else is the same.
Hope that helps.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|