Modelling Object Models

J

John

Hi there,

Can anyone tell me how to go about modelling an Office object model.

The part I'm not sure of is how to iterate through the objects and methods
etc.

Would you start with looping through the Application object and then go from
there and if so how would you get hold of the various names of those objects
and methods?

Best regards

John
 
N

NickHK

John,
If you mean in code to loop through the properties, methods etc, basically
you can't.
There may be components that can examine the type library and present them
in some way like that, but natively, it's not supported.

If you mean to research/learn the object model, the Object Browser will show
you all available. And help has a section on the hierarchy of objects.
There's also app like Type Library Explorer that may be useful.

NickHK
 
J

John

Hi Nick,

Thanks for your reply. Yes, its the first one really. I'd like to be able
to print off different versions and manipulate what to show.

Do you think this would be easier in VB.NET (I appreciate this is geting out
of scope of the NG)?

Anyway thanks for your time.

Best regards

John
 
N

NickHK

John,
This will get you started
http://www.devx.com/vb2themax/Tip/19223

This sounds it's what you're after
http://msdn.microsoft.com/msdnmag/issues/1200/TypeLib/
"The built-in Object Browser in Visual Basic, like other component browsers
such as OLE View and XRay, is one of the more useful tools. But an even
better tool would be customizable. You can build your own type library
browser using the TypeLib Information Object Library (TLI), a set of COM
objects designed to allow programmers to browse type libraries
programmatically."

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top