How to Import Outlook Contacts into an Access Table with VBA
Question details
The user needs to import Outlook contacts into a Microsoft Access table using a VBA macro, ensuring custom or extended fields like 'Department' are mapped and populated correctly.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Executing a VBA macro to transfer contact properties from Microsoft Outlook into a customized destination table in Access.
- Observed behavior
- The default AddContactFromOutlook macro successfully imports basic contact details but fails to populate the Department field in the destination table.
Open your Microsoft Access database and ensure that you have standard editing permissions for both the destination table design and the VBA modules before modifying the import script.
Map Missing Fields Using Custom VBA Logic
Modify the existing VBA macro to explicitly map the Outlook Contact property to the exact field name in your Access table.
Standard template macros may not natively support all Outlook ContactItem properties. By explicitly referencing the property in your code, you gain complete control over the imported data and can easily include fields like Department, Job Title, or Company.
Press ALT + F11 in Microsoft Access to launch the Visual Basic for Applications editor.
Find the AddContactFromOutlook module or the specific procedure handling the Outlook data import process.
Locate the section where fields are assigned to the recordset. Add a line explicitly setting your table's field to the Outlook property, such as: rs!Department = objContact.Department.
Save the VBA code, close the editor, and execute the macro again to verify that the Department field now populates correctly in your table.

Verify Table Design and Data Types
Ensure the destination table structure accurately matches the incoming Outlook data properties.
Manage Your Data Effortlessly with WPS Office
While deep Access-to-Outlook integrations require specific Microsoft environments, WPS Office offers a lightweight, high-performance alternative for managing lists, contacts, and large datasets. WPS Spreadsheet handles complex data organization seamlessly with excellent format compatibility, completely free of expensive subscriptions.
- 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
- 2. Open WPS Spreadsheet: Launch the Spreadsheet application to start organizing your exported contact data.
- 3. Import Data Easily: Open CSV or Excel files containing your exported Outlook contacts for seamless data management and analysis.

Frequently Asked Questions
Why doesn't the default macro import all Outlook fields?
Template macros are often designed for basic data like Name, Email, and Phone. Extended Outlook properties like Department or Job Title usually require explicit VBA code adjustments to be recognized and imported into the database.
Can I import Outlook contacts into Access without writing VBA code?
Yes. You can use the built-in External Data wizard in Access. Navigate to 'External Data' > 'New Data Source' > 'From Other Sources' > 'Outlook Folder' to guide you through a codeless import process, though it offers less customization.
How do I find the correct Outlook property names for VBA?
Open the VBA Editor (ALT + F11), enable the Microsoft Outlook Object Library under Tools > References, and use the Object Browser (F2) to view the exact properties available under the Outlook ContactItem class.




