DOC в HTML
Материал из DRKB
var
fname: string;
WordAppl, WordDoc: OleVariant;
begin
with TOpenDialog.Create(nil) do
try
Filter := 'word documents (*.doc)|*.doc';
if not Execute then Exit;
fname := FileName;
finally
Free;
end;
WordAppl := CreateOleObject('Word.Application');
try
WordDoc := WordAppl.Documents.Open(fname);
fname := ExtractFilePath(fname) + 'test.htm';
WordDoc.SaveAs(FileName := fname, FileFormat := wdFormatHTML);
finally
WordAppl.Quit;
end;
end;
Author: jack128
Source: http://forum.sources.ru
ID: 04282