Application object (specifying version)

T

Tim

I am working in Visual Basic 6.
I am creating a Word.Application object and
manipulating documents.

When two different versions of Word reside on a machine
(Word 9 & Word 11), how can I specify that the application
object is to be version 9?

Appreciate all Help.
 
H

Helmut Weber

Hi Tim,
When two different versions of Word reside on a machine
(Word 9 & Word 11), how can I specify that the application
object is to be version 9?
Appreciate all Help.
nothing but a workaround,
as I haven't heard of a straightforward solution, yet:

Close every instance of Word
start the Word you like
shell c:\...\winword.exe
getobject

Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
M

Martin Seelhofer

Hi Tim, Hello Helmut
nothing but a workaround,
as I haven't heard of a straightforward solution, yet:

Close every instance of Word
start the Word you like
shell c:\...\winword.exe
getobject

While I agree with Helmut in the technical correctness of the presented
workaround, I strongly recommend not to use it, since dynamically
accessing a different version than the one currently registered as
Word.Application (registry) seams to me to be problematic, to say
the least . Note that the last few Word-versions all re-register
themselves upon startup (thanx to their Self-Healing feature) if
they find some settings in the registry they consider to be
inappropriate. Therefore, a specific Word version might even
aks for its Installation CD which makes your macro virtually
useless...


Cheers,
Martin
 
T

Tim

I have decided to check the version once the Word application object
has been created. If it is a version 11, I will provide instructions for the
user to exit the application, start Word 9, exit Word 9, and then re-try
my new application.

Not very glamorous, but ....

Thanks for your suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top