
a = a & tsIn.Readline - no output
To start with, MsgBox has a limit of ~1023 characters...
Any chance the file contains embedded nulls (chr(0))? MsgBox truncates text at the first embedded
null character...
--
Michael Harris
MVP Scripting
I use the following lines of code to read a whole file in a local variable.
But msgbox a has no results (when the file is quite large).
Why? Who can help? Is there any limitation for a local variable?
Thanks for any help!
Micha
function GetBody(file)
dim fs
dim tsIn
dim a
Set fs = CreateObject("scripting.filesystemobject")
Set tsIn = fs.opentextfile(file, 1)
Do While tsIn.AtEndOfStream <> True
a = a & tsIn.Readline
Loop
tsIn.Close
msgbox a
end function