Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Check if property or method exists on a COM object

$
0
0

Hello,

I am struggling with this problem for quite a time now. I am using COM Interop in PowerPoint. My problem is that almost any property in COM Interop PowerPoint model can generate an exception while accessing them through get and set methods. My current solution to the problem is to work with all the properties in try / catch blocks what is slowing the application down if the exceptions are generated. This solution looks kind of weird and the code is more difficult to read because all of these try / catch statements. Is there any better and faster solution to check if the property methods on a COM Object exists?

Thanks for any suggestions!




Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>