This is an Access 2010 manufacturing system used on 8 pc's in our business. I have added a Reference to the Microsoft Outlook Object Library because my application interacts with Outlook on a couple of the office pc's. This created a problem because some of the pc's in the factory do not have ms office installed. So I placed a copy of MSOUTL.OLB in the c:\temp folder on everybody's pc. I also had to remove this file from the MS Office folder on my office pc in order to force Access to keep a reference to the MSOUTL.OLB i placed in the temp folder.
My problem is that on my pc Access keeps adjusting the reference to point back at the c:\program files\microsoft office folder even though the file is not there. I think it must be seeing the file in the temp folder because my code compiles without complaining about the missing reference. When I distribute the .ACCDB to a machine which does not have ms office, then the missing reference is a problem even though each machine has the file in the temp folder.
I've tried programatically adding the reference like this:
The reference is then visible in the list of references, but the path is once again shown as C:\program files\ms office.
How do I fix this?