how can i identify an MS Excel object type?
I'm using late bin开发者_运维技巧ding OLE automation to work with Excel. The problem is that I don't know how to work with the value returned by Selection because I don't know what type it is...
How can I determine what kind of object it has returned to me? I'd hope for a type name....
Or must I run through a list of values I'm expecting?
You can cast the object to IDispatch
call the GetTypeInfo()
method to get a ITypeInfo
interface and there you can call the GetDocumentation()
method with memid=MEMBERID_NIL
to get the name.
精彩评论