This should be fairly simple: I want to write variables sumbitted via a form to a template, which is then saved as a different name. I can get the basic principle to work, but I want to include a template file as the variable 'htm' rather than write the whole thing out as it's a large(ish) template - the variable I have for htm currently does this as shown below, but I want to use something more along the lines of the commented out htm shown, although for some reason it can't find the file specified. Hope that makes sense.
dim fso, txt, path, html
'create the path
FileDay = left(RODate,2)
FileMonth = mid(RODate,4,2)
path = Server.MapPath("Reports\"&Customer&"_"&FileDay&"-"&FileMonth&".htm"
set fso = Server.CreateObject("Scripting.FileSystemObject"
'htm = fso.GetFile("Includes\ReportTemplate.asp"
htm = "<html><head><title>Report Submitted</title></head><body>"&Customer&"</body></html>"
set txt = fspenTextFile(path, 2, true) 'create the html file
txt.WriteLine(htm)
set txt = nothing
set fso = nothing
dim fso, txt, path, html
'create the path
FileDay = left(RODate,2)
FileMonth = mid(RODate,4,2)
path = Server.MapPath("Reports\"&Customer&"_"&FileDay&"-"&FileMonth&".htm"
set fso = Server.CreateObject("Scripting.FileSystemObject"
'htm = fso.GetFile("Includes\ReportTemplate.asp"
htm = "<html><head><title>Report Submitted</title></head><body>"&Customer&"</body></html>"
set txt = fspenTextFile(path, 2, true) 'create the html file
txt.WriteLine(htm)
set txt = nothing
set fso = nothing