J
J-P-W
Hi,
Using the code below I'm grabbing an ASP page, getting the HTML as a
string. Then I'm trying to save that as an HTML file. If I allow
"strResult = "A line of text" to be there then the small file is
created and written to. If I allow the full HTML to be the string I
get "Microsoft VBScript runtime (0x800A0005) - Invalid procedure call
or argument.
I've looked for limiations of the WriteLine side of things (where the
error is) but can't see any.
Perhaps it's a character that is causing it?
Can anyone advise on how to get around this please?
Thank you
Jon
<%
Function WriteLineToFile(theString, TheFileNameAndPath)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fs
penTextFile(TheFileNameAndPath, 2, True)
f.WriteLine theString
End Function
Dim objXML
Dim strResult
set objXML = Server.CreateObject ("MSXML2.ServerXMLHTTP")
objXML.Open "GET", "http://localhost/.....page.asp"
objXML.Send
strResult = objXML.responsetext
set xmlhttp = nothing
Set objXML = nothing
strResult = replace(strResult,vbcrlf,"")
strResult = replace(strResult,vbtab,"")
' strResult = "A line of text"
FileNameAndPath = "....full path here....\test3.htm"
Call WriteLineToFile(strResult, FileNameAndPath)
%>
Using the code below I'm grabbing an ASP page, getting the HTML as a
string. Then I'm trying to save that as an HTML file. If I allow
"strResult = "A line of text" to be there then the small file is
created and written to. If I allow the full HTML to be the string I
get "Microsoft VBScript runtime (0x800A0005) - Invalid procedure call
or argument.
I've looked for limiations of the WriteLine side of things (where the
error is) but can't see any.
Perhaps it's a character that is causing it?
Can anyone advise on how to get around this please?
Thank you
Jon
<%
Function WriteLineToFile(theString, TheFileNameAndPath)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fs
f.WriteLine theString
End Function
Dim objXML
Dim strResult
set objXML = Server.CreateObject ("MSXML2.ServerXMLHTTP")
objXML.Open "GET", "http://localhost/.....page.asp"
objXML.Send
strResult = objXML.responsetext
set xmlhttp = nothing
Set objXML = nothing
strResult = replace(strResult,vbcrlf,"")
strResult = replace(strResult,vbtab,"")
' strResult = "A line of text"
FileNameAndPath = "....full path here....\test3.htm"
Call WriteLineToFile(strResult, FileNameAndPath)
%>