Bryan Carbonnell
carbonnb at gmail.com
Mon Nov 13 10:53:43 CST 2006
On 11/13/06, Andy Lacey <andy at minstersystems.co.uk> wrote: > If I have Word 97 and Word XP on a machine and I use the construct > > Set oAppWord = GetObject(, "Word.Application") > > how do I determine which version I get? Having just put XP on this machine I > thought changing the Reference to the Word 10 object library instead of Word > 8 would do it, but it hasn't. What's the trick? If you use Word.Application, you get the default version of Word. To get a specific version, you need to use: Set oAppWord = GetObject(, "Word.Application.8") ' Word 97 Set oAppWord = GetObject(, "Word.Application.9") ' Word 2000 Set oAppWord = GetObject(, "Word.Application.10") ' Word 2002 Same for CreateObject if you are creating the word instance -- Bryan Carbonnell - carbonnb at gmail.com Life's journey is not to arrive at the grave safely in a well preserved body, but rather to skid in sideways, totally worn out, shouting "What a great ride!"