Search code examples
reflectionvbscript

List object methods and properties


Is there any way to list available methods for created object in VBS?

For example:

Set IE = CreateObject("InternetExplorer.Application")

I want to list available properties of this object, as:

IE.AddressBar
IE.Application
IE.Busy
...

or methods:

IE.ClientToWindow
IE.ExecWB
IE.GetProperty
...

How can I discover available properties to arbitrary valid object in VBS?


Solution

  • VBScript itself does not support type introspection outside the TypeName and VarType functions, which will give you the type of an object, but won't give you access to its internal structure.

    As other answers explained there is a DLL that would provide this feature, but it doesn't ship with Windows, and since it was part of an old version of Visual Studio there might not be a legal way to obtain it nowadays.