W
whj2000
Unregistered / Unconfirmed
GUEST, unregistred user!
wdOpenFormatWebPages与wdFormatHTML(下面程序中加星号行)在那里定义,要user什么
procedure Html2TextClick(name:string);
var FileName,
ConfirmConversions,
ReadOnly,
AddToRecentFiles,
PasswordDocument,
PasswordTemplate,
Revert,
WritePasswordDocument,
WritePasswordTemplate,
Format,
Encoding,
Visible:OleVariant;
FileFormat,
LockComments,
Password,
WritePassword,
ReadOnlyRecommended,
EmbedTrueTypeFonts,
SaveNativePictureFormat,
SaveFormsData,
SaveAsAOCELetter:OleVariant;
WordApp: TWordApplication;
begin
ConfirmConversions:=false;
ReadOnly:=true;
AddToRecentFiles:=false;
Format:=wdOpenFormatWebPages; //***************
Visible:=false;
FileName:=name;
WordApp.Documents.Open(FileName,ConfirmConversions,ReadOnly,
AddToRecentFiles,PasswordDocument,PasswordTemplate,
Revert,WritePasswordDocument,WritePasswordTemplate,Format);
FileFormat:=wdFormatHTML; //***************
FileName:=name+'.txt';
WordApp.ActiveDocument.SaveAs(FileName,
FileFormat,
LockComments,
Password,
AddToRecentFiles,
WritePassword,
ReadOnlyRecommended,
EmbedTrueTypeFonts,
SaveNativePictureFormat,
SaveFormsData,
SaveAsAOCELetter);
end;
procedure Html2TextClick(name:string);
var FileName,
ConfirmConversions,
ReadOnly,
AddToRecentFiles,
PasswordDocument,
PasswordTemplate,
Revert,
WritePasswordDocument,
WritePasswordTemplate,
Format,
Encoding,
Visible:OleVariant;
FileFormat,
LockComments,
Password,
WritePassword,
ReadOnlyRecommended,
EmbedTrueTypeFonts,
SaveNativePictureFormat,
SaveFormsData,
SaveAsAOCELetter:OleVariant;
WordApp: TWordApplication;
begin
ConfirmConversions:=false;
ReadOnly:=true;
AddToRecentFiles:=false;
Format:=wdOpenFormatWebPages; //***************
Visible:=false;
FileName:=name;
WordApp.Documents.Open(FileName,ConfirmConversions,ReadOnly,
AddToRecentFiles,PasswordDocument,PasswordTemplate,
Revert,WritePasswordDocument,WritePasswordTemplate,Format);
FileFormat:=wdFormatHTML; //***************
FileName:=name+'.txt';
WordApp.ActiveDocument.SaveAs(FileName,
FileFormat,
LockComments,
Password,
AddToRecentFiles,
WritePassword,
ReadOnlyRecommended,
EmbedTrueTypeFonts,
SaveNativePictureFormat,
SaveFormsData,
SaveAsAOCELetter);
end;