Solved

Two seperate instances of winword.exe

Posted on 2007-11-21
2
363 Views
Last Modified: 2013-11-26
I have two seperate instances of winword.exe running in my machine.  I want to run the macro which is present in the second instance of winword.exe.  If I use the code Set objWordApp = GetObject(,"Word.Application") it always points to the first instance of running word in which there is no macro to run, so it causing an error for me.  Can I switch between winword.exe instances.  In my search I am able to find the correct window, get its caption, handle. threadID, processID (two PID of each winword).  But how can I relate all these info and get or identify the second winword.exe object????
0
Comment
Question by:venkip
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Expert Comment

by:Flyster
ID: 20331036
I would try renaming the second instance as winword2.exe to see if that worked.

Flyster
0
 
LVL 25

Accepted Solution

by:
imitchie earned 250 total points
ID: 20331239
this should help:  http://support.microsoft.com/kb/288902
basically, it always attaches to the first instance if you use just the classname.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question