Fix Outlook Object Library References in Access VBA
Question details
Make an Access VBA application automate Outlook without depending on a specific Outlook object library version.

- Product
- Microsoft Access VBA and Microsoft Outlook
- Device & OS
- not provided
- Scenario
- An Access application uses the Outlook 14.0 Object Library but may run on computers with a different Office version, such as Office 2013.
- Observed behavior
- The version-specific Outlook reference may be missing or cause the VBA project to fail on another computer.
Confirm that Outlook is installed on each target computer. In Access, open the VBA editor and check Tools > References for a missing or version-specific Outlook object library reference.
Use late binding for Outlook objects in Access VBA
Remove the dependency on a specific Outlook object library version by creating Outlook objects at runtime.
Late binding declares Outlook variables as Object rather than as Outlook-specific types. It avoids a version-specific Outlook reference but does not guarantee compatibility with every Outlook configuration or feature.
In Access, press Alt+F11 and open the module that automates Outlook.
Replace declarations such as Dim olApp As Outlook.Application and Dim mail As Outlook.MailItem with Dim olApp As Object and Dim mail As Object.
Replace version-specific creation code with CreateObject. For example: Dim olApp As Object Dim mail As Object Set olApp = CreateObject("Outlook.Application") Set mail = olApp.CreateItem(0) mail.Display
Replace Outlook library constants in the affected code with their documented numeric values or locally defined constants. For example, CreateItem(0) creates a mail item without using olMailItem.
In the VBA editor, select Tools > References and clear the Outlook object library reference. Select Debug > Compile, resolve any remaining Outlook-specific types or constants, and test the application on the target computer.

Work with Office documents using WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and compatibility with common Microsoft Office formats, making it easier to move everyday document work. It does not fix Access VBA references or replace Outlook automation.

Frequently Asked Questions
Why does the Outlook reference fail on another computer?
The Access VBA project may reference a specific Outlook object library version that is unavailable on the other computer. Check Tools > References in the VBA editor for a reference marked MISSING.
Can I remove the Outlook reference immediately?
First change Outlook-specific declarations and constants to late-bound equivalents. Then clear the reference under Tools > References and use Debug > Compile to find remaining dependencies.
Does late binding mean Outlook is no longer required?
No. CreateObject("Outlook.Application") still requires Outlook to be installed and available on the computer running the Access application.
What should I use instead of the olMailItem constant?
Use its numeric value, 0, as in olApp.CreateItem(0), or define a local constant with that value. This avoids relying on the Outlook library for that constant.




