Micro Focus QTP (UFT) Forums
Generate Word document - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Generate Word document (/Thread-Generate-Word-document)



Generate Word document - phabloxar - 08-27-2012

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.


RE: Generate Word document - sshukla12 - 08-28-2012

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


RE: Generate Word document - phabloxar - 08-28-2012

Hi Sankalp! Thanks for helping.

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

Thanks and regards.

phabloxar.


RE: Generate Word document - phabloxar - 08-29-2012

I already solved it!!!! =)

phabloxar