procedure UseHtmlDialog(htmlName:string);
var
a,b:OleVariant;
c:integer;
begin
a:=0;
b:=0;
WebBrowser1.Navigate(htmlName);
c:=WebBrowser1.QueryStatusWB(OLECMDID_SELECTALL);
if c>0 then
WebBrowser2.ExecWB(OLECMID_SAVEAS,OLECMEXCOPY_DONTPROMPTUSER,EmptyParam,EmptyParam)
else
Showmessage('命令不能执行');
end;