VBA & Macro Problems

How to Import Outlook Contacts into an Access Table with VBA

Anum MushtaqAnum Mushtaq Nov 2, 2026 868 views

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.

Importing Outlook Contacts into an Access Table with VBA
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the VBA Editor

Press ALT + F11 in Microsoft Access to launch the Visual Basic for Applications editor.

2
Locate the Import Macro

Find the AddContactFromOutlook module or the specific procedure handling the Outlook data import process.

3
Add Field Mapping Logic

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.

4
Run and Test the Macro

Save the VBA code, close the editor, and execute the macro again to verify that the Department field now populates correctly in your table.

Map Missing Fields Using Custom VBA Logic
Complete Control: Using direct VBA automation gives you granular control over exactly which fields and data types are imported from Outlook, preventing skipped columns.
Free Microsoft Office alternative

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. 1. Download and Install: Get WPS Office for free from the official website and install it on your computer.
  2. 2. Open WPS Spreadsheet: Launch the Spreadsheet application to start organizing your exported contact data.
  3. 3. Import Data Easily: Open CSV or Excel files containing your exported Outlook contacts for seamless data management and analysis.
Free, lightweight, and fast installation on all devicesHigh compatibility with Microsoft Excel (.xlsx, .csv) formatsFamiliar user interface for immediate productivityPowerful built-in features for filtering and managing contact lists
microsoft office alternative - wps office

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.