beta的程序会改变文本的格式,下面是我的程序:
procedure TForm1.Html2TextClick(Sender: TObject);
var FileName,
ConfirmConversions,
ReadOnly,
AddToRecentFiles,
PasswordDocument,
PasswordTemplate,
Revert,
WritePasswordDocument,
WritePasswordTemplate,
Format,
Encoding,
Visible:OleVariant;
FileFormat,
LockComments,
Password,
WritePassword,
ReadOnlyRecommended,
EmbedTrueTypeFonts,
SaveNativePictureFormat,
SaveFormsData,
SaveAsAOCELetter:OleVariant;
begin
ConfirmConversions:=false;
ReadOnly:=true;
AddToRecentFiles:=false;
Format:=wdOpenFormatWebPages;
Visible:=false;
FileName:=OpenDialog1.FileName;
WordApp.Documents.Open(FileName,ConfirmConversions,ReadOnly,AddToRecentFiles,PasswordDocument,PasswordTemplate,
Revert,WritePasswordDocument,WritePasswordTemplate,Format);
FileFormat:=wdFormatHTML;
FileName:=txtFileName.Text;
WordApp.ActiveDocument.SaveAs(FileName,
FileFormat,
LockComments,
Password,
AddToRecentFiles,
WritePassword,
ReadOnlyRecommended,
EmbedTrueTypeFonts,
SaveNativePictureFormat,
SaveFormsData,
SaveAsAOCELetter);
end;
怎么样,现在可以给分了吧