Re: Getting TWebbrowser contents HTML into a string
- From: HanslH <nospam@xxxxxxxxxxxxx>
- Date: Thu, 27 Mar 2008 17:08:17 +0100
ahh, I found out I had to use the navigatecomplete2 event to get to
the document props..
On Thu, 27 Mar 2008 15:24:09 +0100, HanslH <nospam@xxxxxxxxxxxxx>
wrote:
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;
- References:
- Getting TWebbrowser contents HTML into a string
- From: HanslH
- Getting TWebbrowser contents HTML into a string
- Prev by Date: Getting TWebbrowser contents HTML into a string
- Next by Date: Re: Scanline Enigma
- Previous by thread: Getting TWebbrowser contents HTML into a string
- Index(es):