Solved

Two seperate instances of winword.exe

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

710 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