Home > Back-end >  The use of the called IMessage -- CreateMHTMLBody
The use of the called IMessage -- CreateMHTMLBody

Time:10-02

Found this web page is not preserved has time to help see thanks!
http://www.cnblogs.com/DKSoft/archive/2008/10/20/1315297.html

CreateMHTMLBody stopped does not perform,
don't know what is going onChinahuyong brother has time to help see


The function HtmlSaveAsMHT (URL: string; FilePath: string; FileName: string) : Integer;
Var
MSG: called IMessage --;
The conf: IConfiguration;
Stream: _Stream;
TempFileName, Ext: string;
TempFilePath: string;
The begin
MSG:=CoMessage. Create;
The conf:=CoConfiguration. Create;
Try
Try
MSG. The Configuration:=conf;

MSG. CreateMHTMLBody (URL, cdoSuppressNone, ' ', ');//stop here did not perform down
//the stream. Charset:='gb2312';
Stream:=MSG. GetStream;
Stream. SaveToFile (NormFileName (FilePath, FileName), adSaveCreateOverWrite);
Result:=1;
Except,
Try//go wrong for the first time, try again the second time save
MSG. CreateMHTMLBody (URL, cdoSuppressAll, ' ', ');//cdoSuppressAll, images, sound, style, etc will not be saved to the MHT file.
MSG. GetStream. SaveToFile (NormFileName (FilePath, FileName), adSaveCreateOverWrite);
Result:=1;
Except,
SendErrToMemo (' failed to download file! URL: "+ URL);
WriteLog (' failed to download file! '+ TempFileName +' (' + URL + ') ', LogFile);
Result:=0;
end;
end;
The finally
MSG:=nil;
The conf:=nil;
Stream:=nil;
//web:=nil;
end;
end;

CodePudding user response:

It looks like not wrong ah, you a breakpoint to see?

CodePudding user response:

Breakpoint has stopped here not to come out there
MSG. CreateMHTMLBody (URL, cdoSuppressNone, ' ', ');//stop here did not perform down

Xp sp3 system other page also is this page not found have problem
http://www.cnblogs.com/DKSoft/archive/2008/10/20/1315297.html

Chinahuyong look again thank you!


CodePudding user response:

Is there a master to look at

CodePudding user response:

Continue to focus on this problem
  • Related