Outlook 9.0 Object Library reference changes to 11.0

SteveF

New Member
Joined
Jun 15, 2004
Messages
27
I need some help with a strange error that happens intermittently.

I have an Excel VBA process that formats some reports and sends them as email attachments. The process works flawlessly EXCEPT that OCCASSIONALLY the reference that I have to the Microsoft Outlook 9.0 Object Library will change to Microsoft Outlook 11.0. When this happens, it can't find the msoutl.olb object library because the 11.0 reference points to a folder I don't have (c:\Program Files\Microsoft Office\OFFICE11\msoutl.olb).

To fix the problem, I un-select the 11.0 reference and re-select the 9.0 reference, save the project, and it works for several days. But then it seems to change itself back to the 11.0 reference and stops working. This process runs on an unattended workstation, so no other Excel activity is happening.

Any help on this strange issue would be greatly appreciated!

Thanks,
Steve
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I would suggest you use late-binding. That way it doesn't matter which version of Outlook someone has. And the references do not get bungled.

With late-binding you do not have to set a reference manually, the reference is set through code.

Code:
Dim oOutlook As Object
Set oOutlook = CreateObject("Outlook.Application")

I usually develop code using references and early binding and then convert my code to late-binding when deployed. That is if I am not guaranteed that every user has the same version of office.

Chuck
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,276
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top