473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Get instances of Winword.exe

Visual Basic 6

I use Getobject() to get the object of Word application.

I always get the first instance of Winword.exe

I have a macro in another instance of Winword.exe

I need to get the object of the second or third instance of Winword.exe

I am able to get the caption, threadid, processid, class.

How can I use Getobject() in Visualbasic to point to a specific instance of Winword.

In the alternate, can I use Getobject() on successive instances of Winword.exe untill the correct instance is identified

Can anyone help

Thanks

Jay
Nov 21 '07 #1
1 2029
AHMEDYO
112 100+
HI..



i think there is no way to do that, but you can create Word object with specified file that you wanna to open



Expand|Select|Wrap|Line Numbers
  1.  
  2. Dim WordObj As Object
  3.  
  4. Set Wordobject = GetObject("C:\Yourfile.doc", "Word.Document")
  5.  
  6.  


Best Regards
Nov 23 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bhavya Shah | last post by:
Hello there, I am facing a strange problem. I use office converters for converting Microsoft Word documents to html in my application. I use office automation for the entire process. I open the...
3
by: John Mark Howell | last post by:
Does anyone know how I could view a WinWord Doc in a WinForm (other than convert to RTF or HTML)? I cannot convert it to RTF because I have drawn lines and they will not come through when...
0
by: Just D. | last post by:
Guys, I'm writing the Windows Application and one of the ideas is to use a RichText field to store/show some formatted text, probably with pictures. The problem is that this RichEdit control is...
2
by: Richard Loupatty | last post by:
I tried to start winword.exe from an aspx (after granting things with dcomcnfg) and i can see winword.exe showing up in the taskmanager, but i don't see the word-application itself. I did set...
2
by: Robin Tucker | last post by:
Hi, I am diligently releasing (Marshal.ReleaseComObject (o) ) all references I pick up while generating a report using VB.NET in my software. At least, I *think* I am. However, when I have...
3
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
2
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
2
by: Dean Slindee | last post by:
Using this statement to utilize the spell checker in WinWord: WinOffice.clsWord.SpellChecker(txtNote.Text) 'this does not work because no main window is displayed 'Dim proc =...
2
ajester
by: ajester | last post by:
I need WinWord to look like it's being executed from the correct path: C:\Program Files\Microsoft Office\Office12\WinWord.exe when in reality it's being launch from a Java app using the path...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.