Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Two seperate instances of winword.exe

Posted on 2007-11-21
2
Medium Priority
?
369 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 750 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

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 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 …
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…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

972 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