Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can QTP compare two MS word documents
#5
Solved: 11 Years, 8 Months, 3 Weeks ago
Yes, I also liked the Word built in feature to compare documents. You will find this in third part of the ongoing series
Automating Word Documents
here is the simple peice of code to compare two documents -
Code:
Doc1= "c:\Test1.docx"
Doc2= "c:\Test2.docx"
    set oWord = createobject("Word.Application")
     oWord.Visible =true
     set oCompared = oWord.Documents.Open(Doc2)
    oCompared.Compare(Doc1)
    oCompared.Close

Reply


Messages In This Thread
Can QTP compare two MS word documents - by Yogini - 10-28-2008, 12:06 PM
RE: Can QTP compare two MS word documents - by Saket - 11-11-2010, 08:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  UFT Word automation wannel 1 2,475 10-31-2016, 06:59 PM
Last Post: wannel
  Compare WebTable Elements saraiado 1 2,699 06-11-2015, 06:54 PM
Last Post: venkatesh9032
  How to compare two binary values Naresh 0 2,484 09-09-2014, 05:06 PM
Last Post: Naresh
  Can QTP AOM identify word documents that are already opened anil2u 2 4,644 09-05-2013, 12:45 PM
Last Post: anil2u
  how to compare excel with datatatble diya 4 5,747 12-04-2012, 05:39 AM
Last Post: diya

Forum Jump:


Users browsing this thread: 1 Guest(s)