Getting TWebbrowser contents HTML into a string



How do I get TWebbrowser contents HTML into a string.

I found about 10 examples of code that should do that and they all
compile well but give an acess violation if I try to access the body
property of the TWebbrowser document property at runtime.
I use delphi turbo 2006, windows vista business, IE7

example of failing code:

procedure TForm1.BitBtn1Click(Sender: TObject);
var
Html : string;
HtmlDocument: OleVariant;
begin

webbrowser1.navigate('http://www.flickr.com/recent_activity.gne?days=');

HtmlDocument:= WebBrowser1.OleObject.Document;
memo1.lines.add(Htmldocument.body); // AV here

webbrowser1.navigate('http://flickr.com/?clear=1');


end;
.



Relevant Pages

  • TWebBrowser kann Script nicht ausführen
    ... Dazu habe ich ein TWebBrowser Element auf die Form gelegt. ... In einem String generiere ich den HTML Text, ... Ein einfaches "Hello World" in HTML wird fehlerfrei angezeigt. ... In der Appliaktion hat der TWebBrowser allerings ein Problem damit. ...
    (de.comp.lang.delphi.misc)
  • Re: getAttribute question
    ... oddity with IE that getAttributereturns an empty string if the ... HTML specification, ... appropriate places in the HTML 4 and DOM HTML specifications. ...
    (comp.lang.javascript)
  • Re: [PHP] generating an html intro text ...
    ... You would have to search out and pull in all closing tags. ... grab 256 characters -- The string. ... html markup should not go towards the string length count, ...
    (php.general)
  • [perl-python] 20050127 traverse a dir
    ... suppose you want to walk into a directory, say, to apply a string ... replacement to all html files. ... So, when ever myfun is called, we need to loop thru the ... # with a recursive "filter" ...
    (comp.lang.perl.misc)
  • [perl-python] 20050127 traverse a dir
    ... suppose you want to walk into a directory, say, to apply a string ... replacement to all html files. ... So, when ever myfun is called, we need to loop thru the ... # with a recursive "filter" ...
    (comp.lang.python)