Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Outlook Contacts to XML

Keywords:    outlook Contacts to XML

Want to put your Outlook Contact information into XML quickly with the Jet 4.0 Provider (no less)!?

I tested the following script, but you have to change the DATABASE= portion of the Connection String to suit your own situation.

In theory, the script could be modified to get at all folders in Outlook.

cConn = "Provider=Microsoft.JET.OLEDB.4.0;Exchange 4.0;MAPILEVEL=Outlook Address Book\;PROFILE=Outlook;TABLETYPE=1;DATABASE=C:\WINNT\Profiles\stanl.000\Application Data\Microsoft\Address Book"
DB    = ObjectOpen("ADODB.Connection")
RS    = ObjectOpen("ADODB.Recordset")

BoxOpen( "Creating Address Book XML File","Please Wait...")
DB.Open( cConn )
cSQL  = "SELECT * from [Contacts]"

RS.Open( cSQL,cConn,3,1 )
RS.Save( "Contacts.xml",1)
RS.Close()
ObjectClose(RS)
DB.Close()
ObjectClose(DB)
BoxShut()

Exit

Article ID:   W15245