View Single Post
 
Old 07-21-2017, 08:11 AM
slaycock slaycock is offline Windows 7 64bit Office 2013
Expert
 
Join Date: Sep 2013
Posts: 255
slaycock is on a distinguished road
Default

The array approach was one of my first solutions (except I was using split with a single string). But to make the code more meaningful I also defined an enumeration to index the array.

This allowed me to say things like

docXMLProp(<propertyname>)

Which still leaves what should be a constant writable. So I made the array behave like a constant by putting it in a class. That leaves me with the choice of one get statement per enumeration value

docXMLProp.<propertyname>

or a single get property with a case statement to allow the form

docXMLProp.item(<propertyname>) or
docXMLProp(<propertyname>)

if you go through the rigamarole of exposting the class, setting the default property as item then reimporting.
Reply With Quote