Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automating Word Docs
#1
Not Solved
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...

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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best method to use for automating 1000 records shuhale 0 787 07-21-2021, 11:42 PM
Last Post: shuhale
  Check the word and get no. of times that word in the webpage Sandeep.san229 0 1,151 10-31-2018, 06:42 PM
Last Post: Sandeep.san229
  pageDown in word.application wannel 0 1,653 11-25-2016, 10:06 PM
Last Post: wannel
  Inserting Images in the Word file. atulparate 2 6,401 04-09-2012, 12:44 PM
Last Post: swathi
  Word text formatting Rahull 5 4,219 01-05-2011, 05:56 PM
Last Post: Rahull

Forum Jump:


Users browsing this thread: 1 Guest(s)