I have a VBScript and need to run a macro and insert data into a table. To run the macro I create an Access.Application object and use the Run function:
Dim oAccess
Set oAccess = CreateObject("Access.Application")
oAccess.OpenCurrentDatabase(accessFile)
oAccess.Run macroName
Now I need to insert some records and to do that I need to use an ADODB.Connection and Recordset. However normally I would call Connection.Open but the database is already open from the Access.Application. Is there a way to not have to open the Access file twice and instead get the ADODB.Connection from the Access.Application object?