View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_790_] Leith Ross[_790_] is offline
external usenet poster
 
Posts: 1
Default Unable to Retrieve Complete Web Page


Alan;477883 Wrote:
I do seem to have the same truncation problem when I read the firl
back in with this code:

' Read each line of the file, looking for the description
Dim myFileName As String
Dim myLine As String
Dim FileNum As Long

myFileName = ThisWorkbook.Path & "\URL.txt"
FileNum = FreeFile
Close FileNum
Open myFileName For Input As FileNum
count = 0
Do While Not EOF(FileNum)
count = count + 1
Line Input #FileNum, myLine
Debug.Print myLine
Debug.Print "===========================================" &
vbCrLf
Debug.Print count & vbCrLf
Debug.Print vbCrLf &
"===========================================" & vbCrLf
myLine = ExtractCoDescr(myLine)
If Len(myLine) 0 Then
GetCoDescription = myLine
Close FileNum
Exit Do
End If
Loop
Close FileNum


Hello Alan,

The code I wrote downloads the web page in binary format using unsigned
bytes. This is all stored into memory before being save to a disk file
with a ".txt" extension. Web page size is only limited by available
memory. The advantage of binary is that all information is brought into
the file, not just text and this could be what is causing your
truncation problems. The file reading method you are using expects the
file data to be in a specific format. What information are you trying to
locate or extract from the file?


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=131744