'This function returns 1 ot 0 based on success or failure 'In Printer Setting "Acrobat PDF" Printing Preferences, you must uncheck Rely on system fonts or it throws an error Code -įunction Print_PDF_Sheets(sPDF_File_Name As String) As Integer I need help getting the FileToPDF method to work as fast in Excel 2007 as it does in 2003. The Function is extremely fast in Excel VBA 2003, but it is very slow in Excel 2007. Unfortunately, I am being forced to upgrade (kicking and screaming I might add) from Office 2003 to Office 2007. I hope someone finds this Function helpful. MypdfDist.FileToPDF tempPSFileName, tempPDFFileName, "" Printtofile:=True, Collate:=True, prtofilename:=tempPSFileName TempLogFileName = tempPDFRawFileName & ".log"ĪctiveSheet.PrintOut Copies:=1, preview:=False, ActivePrinter:="Adobe PDF", _ TempPDFFileName = tempPDFRawFileName & ".pdf" TempPSFileName = tempPDFRawFileName & ".ps" I am running Acrobat and Distiller v7.0 and Excel 2003 and I have installed the Acrobat libraries in Tools->ReferencesĪny assistance would be greatly appreciated I was wondering if the files need to be a particular place for the FiletoPDF to work (the ps file is currently being generated in My Documents. The macro is running without errors and it is creating the postscript fileīut it doesn't seem to be creating the PDF. I found the code below from a search of previous topics I am trying to output to a pdf from Excel.
0 Comments
Leave a Reply. |