Macro to export Outlook contacts

L

Louverril

Can anyone tell me how to create a macro (to run from a buton on Outlook)
that will do ths same as the following steps from the menu (or at least
achieve the same i.e. an export of the contacts file in mdb format):

File
Import and Export
Next
Export to a File
Next
Microsoft Access 97-2003
Next
Personal Folders
Contacts
Next
Overwrite existing file = yes
Finish

Thanks Lou
 
M

Michael Bauer [MVP - Outlook]

You can't automate the export but have to write everything yourself.

Add a reference to Microsoft ActiveX Data Objects. With that library you can
work with *.mdb files.

You can use the Pickfolder function to get a folder, or use the
GetDefaultFolder function. Then loop through the Items collection of the
folder, read the properties you want to export, and add one recordset for
every ContactItem to the *.mdb file.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Mon, 19 Jan 2009 09:36:12 -0800 schrieb Louverril:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top