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