Cannot save all data to text file

J

jodleren

Hi all

I found this in this ng (I am kind of new to ASP/VB):

'***************** test
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("C:\Inetpub\wwwroot\sonnich2.htm",
True)
MyFile.WriteLine("This is a test.")
MyFile.Write(ssss)
MyFile.Write(oMail.HTMLBody)
MyFile.Write(sError)
MyFile.Close

It saves the first and last strinf (sError), but not the others.

The HTLBody is built as below, and the ssss it taken from that.
What goes wrong here?

with oMail....
ssss=.HTMLbody
next // *** end of database loop
if sError<>"" then
.HTMLbody=.HTMLbody & "<p><font color=""red"">" & sError & "</
font></p>"
end if
.HTMLbody=.HTMLbody & "</body></html>"

WBR
Sonnich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top