So, I have been able to access several object types in an Access database via ADOX from VBSCRIPT. My question is, there are also some VBA functions and subroutines in the Access database, and I would like to be able to access them as well. Is this possible with ADOX from VBSCRIPT, and if so can someone pass along an example?
Here's the basic test code I used to access some of the objects.
Set adox = CreateObject("ADOX.Catalog")
Set Conn = CreateObject("ADODB.Connection")
Conn.open "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=drops.accdb"
adox.activeConnection = Conn
For Each t In adox.Tables
Wscript.Echo "TABLE," & t.Name & "," & t.Type
For Each c in t.columns
Wscript.Echo "COLUMN," & c.Name & "," & c.Type
For Each p in adox.Procedures
Wscript.Echo "PROC," & p.Name & "," & Replace(p.Command.CommandText,chr(13),chr(13))
For Each v in adox.Views
Wscript.Echo "VIEW," & v.Name & "," & Replace(v.Command.CommandText,chr(13),chr(13))
Set Conn = nothing
Set adox = nothing