Solved

Two seperate instances of winword.exe

Posted on 2007-11-21
2
352 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
2 Comments
 
LVL 22

Expert Comment

by:Flyster
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now