Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I know there has been many posts about this,but no matter what I try I still end up with the save as dialog with the added action of overwriting the file. How do I write the macro to overwrite the file, and then close the pdf?
This is the macro I currently have:
sub printreport
ActiveDocument.PrintReport"RP01"
reportFile = "C:\report"&".pdf" printReportPDF(reportFile)
End sub
Function printReportPDF(pdfOutputFile)
Set WSHShell = CreateObject("WScript.Shell")temp3 = WSHShell.Run("cmd /K del c:\Hedge.pdf /q & exit")
temp3 = WSHShell.Run("cmd /K ren c:\QVOutput.pdf Hedge.pdf & exit") set WSHShell = Nothing
End function
I run on QW 10 SR1 and on IE 8
Thanks