The basic technique is:
1. Develop your application for the lowest common denominator (ie Word 9, as
you are doing), and
2. Use late binding.
During development add the Word library as a project reference and declare
it using something like
Dim WordApp as Word.Application
Set WordApp = new Word.Application
Then before distribution, remove the Word library reference and change the
declaration to
Dim WordApp as Object
Set WordApp = GetObject("Word.Application")
You can use late binding during development if you wish; but you get no
intellisense help or syntax checking on the Word object.
> I'm working in-house on an Access application to which I've recently
> added automatic fill-out-the-form functionality. The problem: I'm in
[quoted text clipped - 27 lines]
> Reluctant Access Programmer
> mark.loveless@pmilends.com
Howard Kaikow - 27 Jul 2004 16:28 GMT
If you develop using the earliest version of Word, then you should use
early, not late, binding.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> The basic technique is:
>
[quoted text clipped - 49 lines]
> > Reluctant Access Programmer
> > mark.loveless@pmilends.com
Jezebel - 27 Jul 2004 22:53 GMT
Howard, perhaps you didn't read the original post. The OP's problem is
precisely that early binding isn't appropriate in this case. Unless you're
suggesting that the OP install the Word 9 library on all machines?
Code developed for Word 9 is upward compatible, so by using late binding the
app will function happily with those users who have later versions.
> If you develop using the earliest version of Word, then you should use
> early, not late, binding.
[quoted text clipped - 53 lines]
> > > Reluctant Access Programmer
> > > mark.loveless@pmilends.com
Howard Kaikow - 28 Jul 2004 09:02 GMT
You only need Word 97 (which is Word 8, not Word 9) on the development
system.
When you compile with Word 97, later versions of Word will automatically
use the correct library, so early binding should be used.
For example, see the following which was compiled using Word 97.
http://www.standards.com/OhMyWord/SetReferenceInWordProject.html

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> Howard, perhaps you didn't read the original post. The OP's problem is
> precisely that early binding isn't appropriate in this case. Unless you're
[quoted text clipped - 63 lines]
> > > > Reluctant Access Programmer
> > > > mark.loveless@pmilends.com
Jezebel - 30 Jul 2004 03:57 GMT
We must be thinking of different things. If you add Word.9 as a reference to
your project and create an early-bound object, it will fail if the user has
(eg) Word.10. Late binding avoid this problem.
> You only need Word 97 (which is Word 8, not Word 9) on the development
> system.
[quoted text clipped - 78 lines]
> > > > > Reluctant Access Programmer
> > > > > mark.loveless@pmilends.com
Howard Kaikow - 30 Jul 2004 10:51 GMT
If you use version N as a reference, the code will work with any later
version.
I do this often.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> We must be thinking of different things. If you add Word.9 as a reference to
> your project and create an early-bound object, it will fail if the user has
[quoted text clipped - 94 lines]
> > > > > > Reluctant Access Programmer
> > > > > > mark.loveless@pmilends.com
Jezebel - 31 Jul 2004 01:21 GMT
Well done! You've caught the drift.
> If you use version N as a reference, the code will work with any later
> version.
[quoted text clipped - 108 lines]
> > > > > > > Reluctant Access Programmer
> > > > > > > mark.loveless@pmilends.com
Howard Kaikow - 31 Jul 2004 09:47 GMT
Yes, but I'm talking about early, not late binding.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> Well done! You've caught the drift.
>
[quoted text clipped - 118 lines]
> > > > > > > > Reluctant Access Programmer
> > > > > > > > mark.loveless@pmilends.com
Mark Loveless - 27 Jul 2004 23:04 GMT
Thanks. I had been working at it backwards, thinking I would have to
read the registry to get the explicit class and create that, when it
hit me that the CreateObject wasn't be flagged as an error (and was in
fact already doing what I was thinking I had to do manually , i.e.
reading the class from the registry to find the appropriate DLL) but
the object declaration, just as you note. I tried it as with appWord
declared as Object rather than Word.Application, and once I cleaned up
the constants (e.g. wdDoNotSaveChanges), it compiled OK. After
reading your comments I see I'm on the right track now, and will use
method 2 - develop with the explicit declaration and distribute
without.
As I expected, just cluelessness on my part. Thanks much.
> The basic technique is:
>
[quoted text clipped - 49 lines]
> > Reluctant Access Programmer
> > mark.loveless@pmilends.com