'This is a simplified ASP logic coding sample
'This is a quick and easy way to customize any kind of text. Looking at this simple logic, can 'Aspose.Word accomplish the same level of ease?
strTextFile = "Hello #FIELD1# #FIELD2#,"
'Search database table for sex and full name
if not RS.eof
if RS("SEX") = "MALE" then
replace(strTextFile, "#FIELD1#", "Mr.")
elseif
RS("SEX") = "FEMALE" then
replace(strTextFile, "#FIELD1#", "Mrs.")
end if
if RS("FULLNAME") <> null or RS("FULLNAME") <> "" then
replace(strTextFile, "#FIELD2#", RS("FULLNAME"))
end if
RS.movenext
end if
'-------------------
'FINAL OUTPUT
'-------------------
'if the given record is SEX = "MALE" and FULLNAME = "David Tao" then the rendered 'strTextFile will look be:
Hello Mr. David Tao,