ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Close PDF files (https://www.excelbanter.com/excel-programming/403022-close-pdf-files.html)

J Wait

Close PDF files
 
I have several pieces of code that create pdf files by using save as pdf
(ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename: ...)

This automatically opens the pdf files that are created. How can I close
these files?

Thank you for your help.

sebastienm

Close PDF files
 
Hi,
Have you tried to set the OpenAfterPublish (or DisplayFileAfterPublish ?)
parameter of the ExportAsFixedFormat method to False? Based on the
documention (<http://msdn2.microsoft.com/en-us/library/bb238919.aspx), that
would prevent the files from being opened and viewed right after the export.
--
Regards,
Sébastien
<http://www.ondemandanalysis.com
<http://www.ready-reports.com


"J Wait" wrote:

I have several pieces of code that create pdf files by using save as pdf
(ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename: ...)

This automatically opens the pdf files that are created. How can I close
these files?

Thank you for your help.



All times are GMT +1. The time now is 10:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com