References when Access 2003 and 2007 installed on same computer

W

waltoc

I have two clients with (different) databases I developed. One is going to
upgrade to Office 2007, the other is not. I therefore have both versions of
Office installed on my desktop (Windows XP OS) and my laptop (Vista OS).
Both databases have references to the Outlook Object Library.

When I compile and run the apps on my PC the reference is to the Outlook 12
Obj Lib and everything works fine. (I have Outlook 12 installed on both
PCs.) Of course when my client tries to run it on their systems they get
errors because that reference isn't installed on their system (they have the
Outlook 11 Obj. Lib.) I haven't figured out a way to install two Outlook Obj
Libs on the same PC to avoid this problem or come up with another creative
solution. Any ideas?

Another problem that is somewhat related. On my desktop (Windows XP) there
is a reference to the Access 11 Obj Lib. When I copy the app to my laptop
Windows Vista) the reference is to Access 12 Obj Lib. (In both cases
everything is being processed under Access 2003.) This too is causing me
errors. While I can locate the Office 11 Obj Lib file I can't seem to add it
to the references. Again, any ideas?

Thanks in advance for any advice
 
T

Tom Wickerath

Hi Walt,

Develope your code using early binding (requires a checked reference to the
appropriate object library, such as Outlook {version} Object Library. Early
binding gives you Intellisense. Once you are satisfied that everything is
working as intended, convert your code to use late binding, and remove the
checked reference to the object library (late binding does not provide
Intellisense). Using late binding allows you to gracefully trap for and
respond to errors, such as Outlook not installed on a particular target
machine.

I have an example of using late bound Outlook code on page 19 of a document
that I call "Access Links.doc". You are welcome to download a zipped copy
from my web site:

http://www.accessmvp.com/TWickerath/

Here is a page about this by Access MVP Tony Toews:

Late Binding in Microsoft Access
http://www.granite.ab.ca/access/latebinding.htm

I suggest that you download a copy of the compiled Help file from Microsoft
on this subject:

http://support.microsoft.com/?kbid=302460

While I can locate the Office 11 Obj Lib file I can't seem to add it
to the references. Again, any ideas?

You won't be able to add references to both the Office 11 Object Library and
the Office 12 Object Library at the same time. Access MVP Allen Browne has
page that may be helpful to you here:

Errors using multiple versions of Access under Vista
http://allenbrowne.com/bug-17.html


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
L

Larry Daugherty

Use late binding and remove the reference to an object library rather
than the early binding you're using now.

In general using early binding is helpful during development in order
to get the benefit of Intellisense. Once you're happy with your code,
change to late binding in order to avoid the situation you currently
have.

HTH
 
W

waltoc

Thanks all. I will give it a go.

--
Walt


Tom Wickerath said:
Hi Walt,

Develope your code using early binding (requires a checked reference to the
appropriate object library, such as Outlook {version} Object Library. Early
binding gives you Intellisense. Once you are satisfied that everything is
working as intended, convert your code to use late binding, and remove the
checked reference to the object library (late binding does not provide
Intellisense). Using late binding allows you to gracefully trap for and
respond to errors, such as Outlook not installed on a particular target
machine.

I have an example of using late bound Outlook code on page 19 of a document
that I call "Access Links.doc". You are welcome to download a zipped copy
from my web site:

http://www.accessmvp.com/TWickerath/

Here is a page about this by Access MVP Tony Toews:

Late Binding in Microsoft Access
http://www.granite.ab.ca/access/latebinding.htm

I suggest that you download a copy of the compiled Help file from Microsoft
on this subject:

http://support.microsoft.com/?kbid=302460



You won't be able to add references to both the Office 11 Object Library and
the Office 12 Object Library at the same time. Access MVP Allen Browne has
page that may be helpful to you here:

Errors using multiple versions of Access under Vista
http://allenbrowne.com/bug-17.html


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top