Fix Access Runtime Error 2001 in Email Macros
Question details
Troubleshoot an Access email macro that works in full Access but fails with error 2001 in Access Runtime.

- Product
- Microsoft Access and Access Runtime
- Device & OS
- Windows
- Scenario
- An Access database uses a macro with a RunCode action to call a VBA procedure that sends email on computers running Access Runtime.
- Observed behavior
- The email procedure works in full Access but reports error 2001 when run in Access Runtime.
Identify the database file, the macro and VBA procedure that send email, and the email method they use. Record the full error description and compare the Access versions, Office bitness, and email setup on the working and affected computers.
Inspect and compile the email procedure in full Access
Use the full version of Access to identify the underlying VBA error and resolve missing references before testing Runtime again.
Open the database in full Access and inspect the email macro in Design View. Find the RunCode action and note the function it calls, such as MacroSendEmailMinutes().
Open the called procedure in the VBA editor with Alt+F11. Add an error handler that records Err.Number and Err.Description, or run the procedure in full Access to identify the failing line; the macro's error 2001 alone may not reveal the cause.
In the VBA editor, select Tools > References and investigate any entry marked MISSING. Correct or remove references as appropriate, then select Debug > Compile and fix any reported errors.
Deploy the corrected database to the affected computer, confirm that required libraries are installed and compatible with its Office bitness, and run the email macro again. Review the recorded error if it still fails.

Check the database trusted location
Use this check when disabled content or trust settings may prevent the email procedure from running.
Test the email method independently
Use this approach to isolate Outlook automation, security, permissions, or SMTP settings from the Access macro.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative for everyday document, spreadsheet, and presentation work. Its familiar interface and Microsoft Office format compatibility make it easy to move existing files. It does not run Access databases or fix Access Runtime errors.

Frequently Asked Questions
What does error 2001 tell me about the email macro?
The error number alone may not identify the underlying cause. Inspect the macro's RunCode action and capture Err.Number and Err.Description in the called VBA procedure to narrow down the failure.
How do I check for missing VBA references?
Open the database in full Access, press Alt+F11, and select Tools > References in the VBA editor. Investigate entries marked MISSING, then use Debug > Compile to check the project.
Can I use Access Runtime with an Access 2010 application?
Yes. Access Runtime can run Access 2010 applications, but the database, required libraries, trust settings, and email method must be configured and tested on the target computer.
Why should I test Outlook or SMTP separately?
The Runtime computer may have a different email profile, security prompt, permission, or SMTP configuration. Test the same email method independently and record its error before changing the macro.
Can WPS Office run the Access email macro?
No. WPS Office does not run Access databases or repair Access Runtime. Use Access and the Runtime environment to troubleshoot the macro; WPS Office can be used separately for compatible documents, spreadsheets, and presentations.




