INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

'Compile error: Object library feature not supported' opening Outlook calendar

'Compile error: Object library feature not supported' opening Outlook calendar

'Compile error: Object library feature not supported' opening Outlook calendar

(OP)
Our Access application, recently migrated from Office 2010 to Office 2016, reads the users Outlook calendar

CODE

Dim MyApp As Outlook.Application
Dim MyNS As Outlook.Namespace
Dim MyFolder As MAPIFolder
Dim MyItems As Items

Set MyApp = CreateObject("Outlook.Application")
Set MyNS = MyApp.GetNamespace("MAPI")
Set MyFolder = MyNS.GetDefaultFolder(olFolderCalendar) 'find calendar
Set MyItems = MyFolder.Items ' find all appointments 

This had been working for years in Office 2010, and works fine for me in Office 2016 (.accdb copied from network share to local C:), however ALL the other users, get the above message at "Set MyApp". Any possible explanations welcome.

RE: 'Compile error: Object library feature not supported' opening Outlook calendar

Since you seem to be trying to do late binding (but are in fact doing early binding), try:

CODE

Dim MyApp As Object
Dim MyNS As Object
Dim MyFolder As Object
Dim MyItems As Object 

Or, if happy with early binding, try:

CODE

Set MyApp = New Outlook.Application 

RE: 'Compile error: Object library feature not supported' opening Outlook calendar

(OP)
Hello strongm,
Thank you for this (I see I must read up on Early and Late Binding!). I have just implemented your first suggestion, but "unfortunately" my original code was working today for the two colleagues present (I had the feeling that it was sometimes working and sometimes not; why else was it working for me, but not for the others?). Extensive use in the near future will hopefully reveal that you have solved my problem
-Peter D.

RE: 'Compile error: Object library feature not supported' opening Outlook calendar

Check references, you definitely had code that referenced outlook library. In case consistent late binding replace olFolderCalendar by 9 too.

combo

RE: 'Compile error: Object library feature not supported' opening Outlook calendar

(OP)
Upon reading up on Early and Late Binding, decided to go for early binding. I do reference the Outlook library (and generating mail messages from VBA does work consistently).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close