Link to home
Start Free TrialLog in
Avatar of Laurence Martin
Laurence MartinFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Object Library not supported (Outlook VBA)

I have some VBA code in Access that creates emails in Outlook.

Public objMail as Outlook.MailItem

Set objMail = Outlook.Application.CreateItem (olMailItem)

This compiles and runs fine on one PC.

However, if I copy the Access file to another user's PC they can not run the code and get the error:

Compile error: Object library feature not supported

The objMail in the Set line is highlighted.

I have checked References and they are all the same on both PCs.  We have also reinstalled Office on the offending PC.

Please explain what's going wrong and what's needed to fix.

Thanks

Laurence
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial