Excel Changing Object Library on me

jcg31

Board Regular
Joined
Aug 20, 2006
Messages
176
I have an Excel application that creates a task and places it in the users tasks in msOutlook. It was written on a msOffice 2003 machine for users with the same set up, it uses the msOutlook 11.0 Object Library on the Outlook side. As long as it is opened and saved in a 2003 Office environment everything works fine, but if it is opened and saved from Office 2007 or above, it no longer plays well with Outlook 2003 because it seems to adopt the appropriate object library for that version of Office in dealing with Outlook (msOutlook 12.0 Object Library in 2007's case). Is there a way to make certain the code always is looking for msOutlook 11.0 Object Library?

Thanks for any help.

Jim
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Alas, you have discovered what having an older version at home (or wherever) is like.

Anyways, the easy answer (okay, a bit of editing is involved) is to change to late binding. That is, change stuff from like As Outlook.Application to As Object. In Outlook's case, I don't think the performance hit would likely be noticable.

Hope that helps,

Mark
 
Upvote 0
A bit.

while in msOffice 2003, I made the change to late binding in the three locations in the code where the library was referenced. I ran it - - it ran fine, populating the task as expected. I saved the file to the hard drive and then emailed it to me (so I could open on another machine). I then opened and ran the same file on a msOffice 2007 machine, it ran fine, populating the tasks to Outlook as designed. I then saved it on the hard drive of the 2007 machine and sent it back to the 2003 machine. When I tried to open it I received the can't find project or library error again.

Jim
 
Upvote 0
While in the older version, did you remove the reference to the library before your last save?

If that's not it, I would carefully look at every decaration to make sure I didn't forget one.

If its still goofy after making sure the library is non referenced and you've gandered all the code, post it.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,856
Members
452,948
Latest member
UsmanAli786

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