> I have an application that needs to write Word and Excel files but don't
> know which versions of Office will be installed on the users machines.
[quoted text clipped - 10 lines]
> thanks
> mike
When doing Office automation, you should always have the *oldest* version of
Office you want to support on your development machine, and set the objects
for compatibility with that.
You then test your completed app on a test machine with the newer version of
Office.
There are two important reasons why you should work this way.
1. The newer version of the object model has extra objects that the older
one doesn't. If you aren't careful, you will use some of them, and then have
terrible trouble debugging your application when testing on the older
version. Moving from older for development to newer for test is much less
likely to give you those problems. (There still may be an occasional
problem, but they will be far, far fewer)
2. The object references normally update themselves automatically when a
newer version of Office is detected, which means you can use early binding
on the old version of Office, and all should be well with the references
when you install on a machine with the newer version.
I suspect you have a fair bit of work still ahead of you.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Michael Howes - 06 Mar 2007 18:38 GMT
> 1. The newer version of the object model has extra objects that the
> older one doesn't. If you aren't careful, you will use some of them, and
[quoted text clipped - 9 lines]
>
> I suspect you have a fair bit of work still ahead of you.
thanks
I hope (and don't think) it will be that much work. The main reasons
being, I'm writing VERY simple documents and the code is complete and
tested on Word/Excel 2003.
My guess was that i'd need to reference the oldest version we are going
to support, which is Office 2000
thanks
mike
Michael Howes - 06 Mar 2007 18:38 GMT
> 1. The newer version of the object model has extra objects that the
> older one doesn't. If you aren't careful, you will use some of them, and
[quoted text clipped - 9 lines]
>
> I suspect you have a fair bit of work still ahead of you.
thanks
I hope (and don't think) it will be that much work. The main reasons
being, I'm writing VERY simple documents and the code is complete and
tested on Word/Excel 2003.
My guess was that i'd need to reference the oldest version we are going
to support, which is Office 2000
thanks
mike