来自MSDN
SaveAs2
此方法出现在面向 .NET Framework 4 的 Word 2007 项目的 IntelliSense 中。但是,此属性不能在 Word 2007 项目中使用
顺便说一下,如果您在此网站上搜索,您会找到针对您问题的响应here
您可以使用以下代码检查用户 PC 上当前安装的 Word 版本:
string v = _myWordApp.Version;
switch(v)
{
case "7.0":
case "8.0":
case "9.0":
case "10.0":
_myWordDoc.SaveAs2000(ref _documentFile, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing);
break;
case "11.0":
case "12.0"
_myWordDoc.SaveAs(ref _documentFile, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing, ref _nothing);
case "14.0"
_myWordDoc.SaveAs2(ref _documentFile, ref WdSaveFormat.wdFormatHTML,
ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing, ref _nothing,
ref _nothing, ref _nothing, ref _nothing,
ref Microsoft.Office.Interop.Word.WdCompatibilityMode.wdWord2007);
break;
default:
errorText = "Not able to get Word Version"
break;
}
抱歉,C# 代码很容易翻译。