Micro Focus QTP (UFT) Forums
Save an Open PDF file - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Save an Open PDF file (/Thread-Save-an-Open-PDF-file)



Save an Open PDF file - mv8167 - 04-03-2012

I have an open PDF file that became this way by selecting a link. Now I need to safe the PDF to gPDFPath. I cannot seem to figure out how to Set an open PDF, Save it and then Close tyhe doc

Code:
gPDFPath = "O:\QTP Tests\NightlyRegressionTesting\Results-PDFandZIP\" & ReportName & "-" & TodaysDate & ".pdf"

'Set AcroAVDoc = CreateObject( "AcroExch.AVDoc" )
AcroAVDoc.Save(PDSaveFull, gPDFPath)
AcroAVDoc.CloseAllDocs()
AcroAVDoc.Exit()
Set AcroAVDoc = Nothing

Any kins suggestions?