Hallo Hansi,
vielleicht hilft dir das weiter:
Delphi-Quellcode:
var
bClearDirty: boolean = true;
function SaveToStream(wb: TWebBrowser; const s: TStream): HRESULT;
begin
if not Assigned(wb.Document) then AssignDocument(wb);
s.seek(0, 0);
Result := (wb.Document as IPersistStreamInit).Save(TStreamadapter.Create(s), bClearDirty);
end;
function SaveHypertext(wb: TWebBrowser; fileName: string): string;
var
fs: TFileStream;
begin
fs := TFileStream.Create(fileName, fmCreate);
SaveToStream(wb, fs);
fs.Free;
end;
procedure Test;
begin
SaveHypertext(WebBrowser, 'c:\temp\hansi.html');
end;
Grüße vom marabu