Reference to Outlook preventing MDE?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I have made a database that references the Outlook 11 library. Everything
in it works a treat, except that when I try to make an MDE to lock the code,
it errors out.

I have set notes flags by all outlook references within the subs and it
turns into an MDE just fine. Am I doing something wrong, or is this a
limitaiton that Access has? Are there any solutions?

Thanks in advance!
Tim
 
Hi Tim,

See Gunny's "Can't Make MDE" listing here:

http://www.access.qbuilt.com/html/conversion.html#CannotMakeMDE

I see no reason why a reference set to Outlook would cause such a problem,
unless, of course, if the reference is MISSING. Your code compiles okay
without any problems, right?

My advice is to never use early bound code for automating Office or Outlook
in a released application. Use early binding (requires checked reference) for
your development and testing, but change to a late bound code (does not
require a checked reference) after you've got everything working properly.
Early binding will give you a slight improvement in speed, but, more
importantly Intellisence and compile time error checking. Late binding will
result in a much more reliable application, when distributed to other users.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Tim Johnson said:
I have made a database that references the Outlook 11 library. Everything
in it works a treat, except that when I try to make an MDE to lock the code,
it errors out.

I would agree with Tom that while this shouldn't be causing your
problem you should consider late binding if your app might be used on
systems that either don't have Outlook or have a different version of
Outlook installed. Also consider the situation in the future where
your corp might have half the computers on the next version of Office
and have still on the old version.

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

Similar Threads


Back
Top