how to get web content from html page

Hi, all

I want to obtain web content through internet. I wrote the following code.

Name DataType subtype

IE Automation ‘Microsoft Internet Controls’.InternetExplorer

HtmlDocument Automation ‘Microsoft HTML Object Library’.HTMLDocument

CLEAR(IE);
CREATE(IE);
IE.Navigate(‘www.google.com’);
SLEEP(1000);

HtmlDocument := IE.Document; MESSAGE(’%1’,HtmlDocument.body.innerText);

System pops up error: The length of text string exceeds the size of string buffer.

These codes can get the whole content from html page if the string buffer is enough. But how to obtain the content line by line? Could any one share experience?

In 5.0 fin.exe they have increased the the string that is being passed from Nav to Automationto 1024 characters. In older version it’s 250 character, you can’t do nothing about it, except don’t pass the string back. You can most of your work without passing any string variables.

Thnaks for your answer. I have solved the problem by using HttpRequest in NAV 5.0.