satyajit
satyajit

Reputation: 2700

extracting connection string from .odc file

I have a .odc file. I would like to extract the connection string from this through VBA code.

Upvotes: 1

Views: 897

Answers (1)

Lokeshwer
Lokeshwer

Reputation: 1139

You could access through connections object in excel

ThisWorkbook.Connections.Item(1).OLEDBConnection.Connection
ThisWorkbook.Connections.Item(1).ODBCConnection.Connection

ODC file shares the same information. If you are still interested in parsing .odx file you could do with XML parser.

Hope that answers your query

Upvotes: 1

Related Questions