如何确定是否安装了 MS Office 2007 SP2?
我正在通过 OLE 使用 MS Word 从我的应用程序生成文档。我想让安装了 MS Office 2007 SP2 的用户能够将文档另存为 PDF。该功能仅在 SP2 中可用,如果未安装该服务包,该选项应被隐藏(当然也适用于以前版本的 MS Office 的用户)。
此信息是否可以在任何地方使用,例如在注册表或任何配置文件中?
In am using MS Word via OLE to produce documents from my application. I want to give the users that have MS Office 2007 SP2 installed the ability to save the documents as PDF. This is only available in SP2, and the option should be hidden if the service pack is not installed (and of course also for users of previous versions of MS Office).
Is this information available anywhere, like in the registry or any configuration file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
找不到任何对您有帮助的内容,但这里有一些您可能会觉得有用的内容。
Office 版本存储在注册表中,
对于 Office 2003 和 2007,值 12.0 发生变化。该密钥有一个数字。我想检查这个数字是否有不同的版本(带/不带 SP1/SP2),看看是否有 sia 差异。
Couldn't find anything helpful for you but here is something which you might find useful.
Office version is stored in registry
the value 12.0 changes for office 2003 and 2007. This key has a number. I think checking this number for different version (with/without SP1/SP2) and see if there sia difference.
有关适用于各个服务包的实际版本信息,请查看此隐藏良好的知识库条目:
http:// /support.microsoft.com/kb/928116
For the actual version infos that apply to the individual service packs have a look at this well hidden kb entry:
http://support.microsoft.com/kb/928116
Microsoft 有不同的插件可提供打印为 PDF 功能:
并且 SP2 也会安装这些插件。
我正在寻找一种方法来测试 PDF 功能是否安装。
仅当计算机上安装了 PDF 功能(通过加载项或 SP)时,才会出现以下文件:
There are different plugins from Microsoft to provide the print to PDF feature:
and SP2 installs these Addins too.
I was looking for a way to test if the PDF feature is installed or not.
The following file is only present if the PDF feature is installed (by an add-in or by the SP) on a machine:
该更新安装在以下注册表项中。
The update is installed in the following registry key.
好吧,这有点晚了,但您可以直接从 VBA 确定服务包,而不必弄乱注册表。显然,当 Microsoft 更新 Office 时,您需要更新它。
使用 Office 不同版本的支持页面,您可以获得内部版本号并使用函数来确定服务包等。Office 2007 显示 Office 中不同应用程序之间的细微差异,因此您必须根据需要进行调整。
那么下面的函数将完成 Excel Office 2007+ 的工作:
Ok, this is a bit late but you can determine the Service pack directly from VBA without having to mess with the registry. Obviously you'd need to update it as Microsoft updates Office.
Using the support pages for the different versions off Office you can get the build number and use a function to determine the service pack etc. Office 2007 shows slight discrepancies between the different applications within office so you'd have to tweak as required.
Then a function as follows will do the job for Excel Office 2007+:
以编程方式检查 MSO.DLL 文件的版本是否大于或等于:
如果安装了 SP2 及更高版本,则这是该文件的值。
Programatically check whether version of the MSO.DLL file is greater than or equal to :
This is the value for the file if SP2 and above is installed.