WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE and Outlook
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 2002:09:05:13:50:48
Last Updated: 2002:09:05:13:50:48