Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Closing an open PDF
#4
Solved: 11 Years, 6 Months, 2 Weeks ago
The lines below should close the file
Code:
AcroApp.Hide()
AcroApp.CloseAllDocs()
AcroApp.Exit()
or for cross verification you may check the returnvalue
Code:
AcroApp.Hide()
returnValue1 = AcroApp.CloseAllDocs()  'returnValue= -1 if successful,0 if not
returnValue2 = AcroApp.Exit()
msgbox returnValue1
msgbox returnValue2
Note: AcroApp.Exit() Returns -1(or true) if the entire shutdown process succeeded. This includes closing any open
documents, releasing OLE references, and finally exiting the application. If any step fails,
the function returns 0, and the application will continue running. This method will not
work if the application is visible (if the user is in control of the application). In such
cases, if the Show() method had previously been called, you may call Hide() and then
Exit().
Please let me know your findings.If this doesn't help..please let me know whether or not there is an error message, if so, what it is?

Regards,
Ravi
Reply


Messages In This Thread
Closing an open PDF - by mv8167 - 08-15-2012, 09:37 PM
RE: Closing an open PDF - by ravi.gajul - 08-19-2012, 12:00 PM
RE: Closing an open PDF - by mv8167 - 08-21-2012, 12:22 AM
RE: Closing an open PDF - by ravi.gajul - 08-21-2012, 01:45 AM
RE: Closing an open PDF - by mv8167 - 08-23-2012, 07:09 PM
RE: Closing an open PDF - by ravi.gajul - 08-23-2012, 10:24 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,640 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
  When QTP is open am not able to open my AUT. chetan3987 2 3,200 02-12-2014, 01:18 AM
Last Post: supputuri
  recovery scenario for closing a message box itself ashima 0 2,303 12-26-2013, 11:10 AM
Last Post: ashima
  closing browser at end bistritapcv 3 6,413 04-12-2013, 07:21 AM
Last Post: basanth27
  closing the browser diya 3 3,745 11-27-2012, 10:14 PM
Last Post: diya

Forum Jump:


Users browsing this thread: 1 Guest(s)