Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generate Word document
#1
Solved: 11 Years, 3 Months, 2 Weeks ago
Hello,

I am working with QTP and I want to ask if with that tool it is possible to generate a Word document and paste there the screens to evidence the tests.

Thanks and regards.

phabloxar.
Reply
#2
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi,
U can use word application refering to below code

Code:
Dim oWord
Set oWord = CreateObject("Word.Application")
oWord.Documents.Add
oWord.Selection.TypeText "Hello World!!! This document is generated by QTP."
oWord.ActiveDocument.SaveAs "c:\test.doc"
oWord.Quit
Set oWord = Nothing

oWord.Documents.Open “C:\test.doc”


Regards,
Sankalp
Reply
#3
Solved: 11 Years, 3 Months, 2 Weeks ago
Hi Sankalp! Thanks for helping.

It is possible to paste an image to a Word document?

Thanks and regards.

phabloxar.
Reply
#4
Solved: 11 Years, 3 Months, 2 Weeks ago
I already solved it!!!! =)

phabloxar
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Header and Footer in word doc anupam4j 0 2,507 10-10-2014, 01:26 PM
Last Post: anupam4j
  How to save the .csv document in runtime JBA 1 2,013 01-06-2014, 10:31 AM
Last Post: supputuri
  How to verify that links within a PDF document are working AHu 0 2,521 08-24-2012, 04:41 AM
Last Post: AHu
  how to convert qtp reports into word document or excel sheet rashmsrit 4 6,076 12-15-2010, 10:04 AM
Last Post: rashmsrit

Forum Jump:


Users browsing this thread: 1 Guest(s)