References

L

Luis

Hello.
I have a DB that uses the Microsoft Outlook 11.0 Library, but this DB is
used by users that has Microsoft Outlook 9.0 Library. This originates
malfunctions on that users. How can i solve this problem?

Thanks

Luis
 
S

solex

Do not reference the Outlook library directly and instantiate your objects
in a Late-Bound mode, e.g.

Dim outlookApp As Object
Set outlookApp = CreateObject("Outlook.Application")

This way the program will attempt to find any copy of Outlook that matches
the Prog ID: "Outlook.Application"

Dan
 
T

Tony Toews

Luis said:
I have a DB that uses the Microsoft Outlook 11.0 Library, but this DB is
used by users that has Microsoft Outlook 9.0 Library. This originates
malfunctions on that users. How can i solve this problem?

To add to Dan's posting.

Late binding means you can safely remove the reference and only have
an error when the app executes lines of code in question. Rather than
erroring out while starting up the app and not allowing the users in
the app at all. Or when hitting a mid, left or trim function call.

You'll want to install the reference if you are programming or
debugging and want to use the object intellisense while in the VBA
editor. Then,. once your app is running smoothly, remove the
reference and setup the late binding statements.

Sample code:
' Declare an object variable to hold the object
' reference. Dim as Object causes late binding.
Dim objWordDoc As Object
Set objWordDoc = CreateObject(" Word.Document")

For more information including additional text and some detailed links
see the "Late Binding in Microsoft Access" page at
http://www.granite.ab.ca/access/latebinding.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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