Access 2003 and Outlook 2007

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

Guest

My clients use Office 2003 and I use Access 2003 but I also use Outlook 2007.
I am no longer able to send an email from vba code from Access 2003. This
makes testing hard. I am not going to switch to Access 2007 yet. I am not
sure that I like it. Any help on this would be great.
 
My clients use Office 2003 and I use Access 2003 but I also use Outlook 2007.
I am no longer able to send an email from vba code from Access 2003. This
makes testing hard. I am not going to switch to Access 2007 yet. I am not
sure that I like it. Any help on this would be great.

Switching to Access 2007 won't really solve your problem, and would most likely cause more with your clients.

Are you automating Outlook with your VBA code? If so, then your users will most likely have a bad or MISSING referecnce
to your Outlook 2007 libraries (which they won't have on their machine).

You should either (a) switch to Late Binding or (b) setup a testbed machine (either real or virtual) which emulates the
"lowest common denominator" and do your final build and package on that machine. Shipping an Access database with a
reference to the Outlook 07 libraries requires that your enduser has (at a minimum) Outlook 2007 on their machine, and
you've indicated that isn't the case.

Many devs use Late Binding, as it does alleviate quite a bit of the hassle of deployment; if your enduser base is
stable, and you are sure of the environment you'll be deploying to (like an IT controlled corporate environment), then
you can use the (b) method, otherwise I'd advise (a).

Basically with Late Binding you use CreateObject (or perhaps GetObject) to make use of whatever version is installed on
the client machine ... so if your code reads like this:

Dim obj As Outlook.Application
Set obj = New outlook.Application

You'd change it to look like this:

Dim obj as Object
Set obj = CreateObject("Outlook.Application")

and then use the obj Object as you would an early-bound Outlook object. Generally most developers make a reference to
the library during development, so they can make use of Intellisense, but then switch over to Late Binding for the final
round of testing.

Tony Toews has some info about Late Binding:
http://www.granite.ab.ca/access/latebinding.htm

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Thanks for the info on late binding. But I cant get Outlook 2007 to work from
Access. I have outlook 12 lib referenced but I get Cant send Message even
when I use the menu send command when I have a report open. I am running all
of the latest service paks. I am about to go back to Outlook 2003. I have
found no help from the kb on this. Maybe its just my setup.
 
Thanks but that is not the problem. Access 2003 and Access 97 will not send a
report to Outlook 2007 from code or from the menu command Send To. I have
tryed the binding bit and it go no results. All i get is a message "Cant Send
This Email Message" I also get this from word 2007 "This error can occur if
you attempt to send a Word document as an e-mail attachment in Word and the
MAPI session was closed and Word is no longer able to connect to that MAPI
session." when I try and send an Access report to word first. I think that
the problem might be something else. Could it be Outlook Connector?
 
Back
Top