Outlook 2003 ADO connection string for use with VBScript...

M

M Scott S

How am I using access to attach to the pst then?

No 'server' - just outlook and access and VBA in access.

However, I need to read the outlook data from another locally installed app
that uses OLEDB and VB script so that I can run an export from the Outlook
pst...

Thanks!
 
E

Eric Legault [MVP - Outlook]

Ah, I kind of wondered if you were using a linked table in Access.

Treat any linked tables in Access (pointing to an Outlook/Exchange source or
not) as any other regular table regardless of connection mode (ADO, DAO,
etc.).

E.g. Using ADO:

Dim rstThis As New ADODB.Recordset
Dim conThis As New ADODB.Connection

conThis.Open "my connection string"
rstThis.Open "Table1", conThis, adOpenDynamic, adLockOptimistic, adCmdTable

The connection string depends on whether you are using an ODBC connection or
OLEDB provider.

However, if you have an existing linked table pointing to a .pst file and
you need to setup a linked table for a different user (or edit the current
linked table), then you need to use the Access Object Model to automate that.
Then use ADO to work with the new linked table.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/
 
Top