views:

134

answers:

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?

+1  A: 

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)

bb