uses MSHtml
funct Get_html(WEB:TWebbrowser):string;
var
IHTML:IHTMLElement;
begin
if Assigned(WEB.Document) then
begin
IHTML := (WEB.Document AS IHTMLDocument2).body;
while IHTML.parentElement <> nil do
begin
IHTML:= IHTML.parentElement;
end;
Result := IHTML.outerHTML;
end;
end;