1

I need to detect if my addin is in PowerPoint 2007 via my C++ addin. The PowerPoint object model exposes Application.Version, which should work, but I do not know enough about how to use this with IDispatch.

How to detect PowerPoint 2007 from a C++ addin?

Jason
  • 16,739
  • 23
  • 87
  • 137

1 Answers1

1

Firstly - call IDispatch::GetIDsOfNames and get id for "Version" property. After that call IDispatch::Invoke which will get Version porperty value by id.

Also, you could generate wrappers with #import directive and use more easy methods for get value of this property.

Maybe this article will help you http://support.microsoft.com/kb/238393 (How To Use Visual C++ to Access DocumentProperties with Automation)

bayda
  • 13,365
  • 8
  • 39
  • 48