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
LJKMartinAsked:
Who is Participating?
 
Bill PrewCommented:
Check the full list of reference on both computers, as well as the order of referenced libraries.  It may be that some other library, or the ordering being different could have an impact.

No idea if this might apply for you, but try renaming the procedure, and then renaming it back as mentioned in this 'interesting' thread...

Object library feature not supported (anymore) :( ...


»bp
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.