【问题标题】:How to detect PowerPoint 2007 from a C++ addin?如何从 C++ 插件中检测 PowerPoint 2007?
【发布时间】:2009-03-07 05:50:01
【问题描述】:

我需要通过我的 C++ 插件检测我的插件是否在 PowerPoint 2007 中。 PowerPoint 对象模型公开了 Application.Version,它应该可以工作,但我对如何将其与 IDispatch 一起使用还不够了解。

如何从 C++ 插件中检测 PowerPoint 2007?

【问题讨论】:

    标签: c++ powerpoint idispatch


    【解决方案1】:

    首先 - 调用 IDispatch::GetIDsOfNames 并获取“版本”属性的 ID。 之后调用 IDispatch::Invoke 将通过 id 获取版本属性值。

    此外,您可以使用#import 指令生成包装器,并使用更简单的方法来获取此属性的值。

    也许这篇文章会对你有所帮助http://support.microsoft.com/kb/238393(如何使用 Visual C++ 自动化访问 DocumentProperties)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-20
      • 2013-04-29
      • 1970-01-01
      • 2011-04-12
      • 2012-11-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多