How to code for different versions!

  • Thread starter Thread starter Ray Keattch
  • Start date Start date
R

Ray Keattch

I am coding in Access2002 for Office 2000/2002 clients. I have some code
that attempts to open a Word.Application but it crashes out on 2000 clients.
I tried to save a version in 2000 format and then create an MDE from that
but the MDE is greyed out?

I have upgraded the Access runtime to ART2002 on the Office 2000 PC's but
my application is still crashing when trying to open Word or Outlook on
them. Also, some of the listboxes filled by SQL statements are empty on the
Office 2000 PC's

How do I code in Access 2002 but still have the applications running in
2000?

Many thanks,

Ray Keattch.
 
Hello.

You need to remove the references to the Word libraries,
and use late binding.


For example, you write this code:

Dim wordApp as new Word.Application

Instead, write this as:

Dim wordApp as Object
Set wordApp = CreateObject("Word.Application")

This will always return an object of the currently
installed Word version.


Regards,
Ivar Svendsen
 
Ivar Svendsen said:
Hello.

You need to remove the references to the Word libraries,
and use late binding.
Thanks for that - I am re-coding the whole app now!

Ray Keattch.
 
Back
Top