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
Solved

Two seperate instances of winword.exe

Posted on 2007-11-21
2
355 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
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Regarding Notepad++ 4 47
VBA - If Bookmark = "XXBOOKMARKXX" then 15 40
Dinamic report to Crosstab query 9 31
VBA Split word document every 5 pages of word document 3 17
As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

766 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