-
I am working on an application that uses Word for its
printouts. Currently my machine has Office 2000
loaded on it. I refernce the Word 9.0 object library.
But, if this application gets loaded onto a machine
with Office 97 the Word 8.0 object has to be
referenced. Is it possible to create the project with
the Word 8.0 object referenced and then when i load
the program onto a machine with office 2000 will it
automatically reference the 9.0 object? I dont want to
have to create 2 programs (1 for office 97 and 1 for
office 2000). that would be a pain to distribute.
What if the program was running on a machine with
office 97 and a month down the road they upgrade to
office 2000? That is a problem i am expecting. Any
help will be appreciatted.
-
The best solution is probably the ugliest one. Use both the 8 and the 9 libraries, and have routines for both. If you are using Word Basic at all, it won't work in 2000, and the kludge for converting Word Basic to VBA also changes with each version of Word. So it's really better to have a routine for each version of Word. You can check the registry to see which version of Word is being used. Good luck!
-
I cant reference both libraries. My machine has office 2000 on it and it only has the Word 9.0 object on it. My other machine has office 97 and all it has is the Word 8.0 object.
-
My oversight. The version 9 library should work for both.
-
What about the way that Word 2000 opens multiple documents. It does not open a new Word application for a new document. So if my application has Word opened under the covers and the user opens Word, works on thier new document and closes Word then my application thinks that word is still open. Is there a way to get around this.
Also, I suppose I will have to have two routines, one for 97 and one for 2000 so that I can take advantage of the features that 2000 has of 97.
-
Use 8
I have made several programs that use Word for printing and I have referenced the word 8.0 object library. If a computer has Word 2000 installed it has worked with no problems.
-
thanks dlute, that is probably the way that i am going to go. i just wanted to take full advantage of the word 2000 objects and properties. i also might end up with two routines to handle each case( 97 or 2000 ).
-
The Word 8.0 and Word 9.0 Object libraries are different.
This means that some functions, objects, attributes and methods will exist in one and not the other....
BUT
In their infinate wisdom Microsoft has made the Word 9.0 object library "Backwards Compatible" with the Word 8.0 library which means if you developed for the lowest common denominator it should work regardless which one it uses.
Be aware however that they have also made some "modifications" to existing objects and their methods which means that a few things may look slightly different on Word 97 than they do on Word 2000... this can't be avoided unfortunately.