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;