07-18-2014, 03:25 AM
Hi-
My application under test (AUT) launches Word and creates a document with a randomized name. What I want to do is search through the open document for a string of text.
And if I do the following...
I get an error saying \"This command is not available because no document is open\" even though Word is open on my machine and there is a doc open.
So my question is – how do you use automation to access Word Documents not launched by the VBscript in QTP? How do you get to existing open Word instances?
Any help would be greatly appreciated. THANKS!!
Tim
My application under test (AUT) launches Word and creates a document with a randomized name. What I want to do is search through the open document for a string of text.
And if I do the following...
Code:
Set oWord = GetObject( ,\"Word.Application\")
Set oDoc = oWord.ActiveDocument
I get an error saying \"This command is not available because no document is open\" even though Word is open on my machine and there is a doc open.
So my question is – how do you use automation to access Word Documents not launched by the VBscript in QTP? How do you get to existing open Word instances?
Any help would be greatly appreciated. THANKS!!
Tim