Get instances of Winword.exe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvjraman
    New Member
    • Nov 2007
    • 2

    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
  • AHMEDYO
    New Member
    • Nov 2007
    • 112

    #2
    HI..



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



    [CODE=vb]

    Dim WordObj As Object

    Set Wordobject = GetObject("C:\Y ourfile.doc", "Word.Document" )

    [/CODE]



    Best Regards

    Comment

    Working...