views:

156

answers:

1

I'm not sure if this is possible, but i would like to create an external table in access with outlook contacts programmatically. I've searched in the Microsoft Access object model, but couldn't find a method or property that enables you to do so.

I need this for synchronizing contact persons between outlook and an application I'm building. I know there are other ways, but this option seems to be the simplest one.

A: 

Below is an example how to do this in visual basic.

Set td = New TableDef
td.Connect = "Outlook 9.0;MAPILEVEL=Postbus - Hello World|;" & _ 
                "PROFILE=Microsoft Outlook Internet Settings;" & _ 
                "TABLETYPE=0;TABLENAME=Contactpersonen;" & _ 
                "DATABASE=C:\DOCUME~1\********\LOCALS~1\Temp\"
td.SourceTableName = "Contactpersonen"
td.Name = "TestContactpersonen"
db.TableDefs.Append td
Niek H.
How does this synchronize Access data with Outlook?
David-W-Fenton
This is how you programmatically define a table in an Access database that connects with Outlook contacts. Exactly what i wanted. After defining this table i can use queries to determine which contacts needs to be updated, etc... Hopefully this clarifies my question and answer.
Niek H.