Hello. I searched the forums and the internet for the answer to this question, but apparently object and browser are so common, there's no way it could resolve what I was interested in.
I want to write some code in an Excel or Word VBA, give it a parent object such as Application or Document and have it print out any child objects and properties dynamically without having to spell out specific property names.
"why" you may ask. When I want to replicate an existing word document including formats, styles, line breaks etc, via code, I want to be able to see what objects they created without having to know every single sub object type and property name, as this would be extremely tedious.
So basically, I want to write a program that dumps an object list with all of the props.
When I want to replicate an existing word document including formats, styles, line breaks etc, I generally just make a copy of the document! And when I want to ask a question about VBA, Excel and Word I generally ask it in the correct forum.
Allow me to rephrase the question. I have a several VB programs that dynamically instantiate objects based on user input. When I capture a catastrophic failure, I would like to have a shared routine that I use across all my programs that I can trigger and have it output the entire object and property structure dumped out to a file so I can evaluate what the situation was that could have triggered the error.
Is there a way that I can take a an object and cycle through its property members (to output the class name and property values) as well as any child objects that are part of the class regardless of the object in question?