Microsoft Office Word 对象模型中的 SaveAs 与 SaveAs2 [英] SaveAs vs SaveAs2 in the Microsoft Office Word object model

查看:306
本文介绍了Microsoft Office Word 对象模型中的 SaveAs 与 SaveAs2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

它看起来像 SaveAs 在 Office 2010 中已经消失,取而代之的是 另存为2.这里发生了什么?两者之间有什么重要的区别吗?我的解决方法是先检查 SaveAs2,然后再回到 SaveAs.这合理吗?

It looks like SaveAs has gone away in Office 2010 in favor of SaveAs2. What is going on here? Are there any important differences between the two? My fix has been to check for SaveAs2 first, and then fall back to SaveAs. Is this reasonable?

推荐答案

它并没有消失,您只是有了另一种保存文档的方法.Save2() 需要一个额外的参数,CompatibilityMode.如果你不关心兼容模式,那么就继续使用 Save().如果这样做,则检查 Application.Version 以验证您是否可以调用 Save2() 而不会出现异常.

It hasn't gone away, you've just got another way to save the document. Save2() takes an extra argument, CompatibilityMode. If you don't care about the compatibility mode then just keep using Save(). If you do then check Application.Version to verify that you can call Save2() without getting an exception.

这篇关于Microsoft Office Word 对象模型中的 SaveAs 与 SaveAs2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆