![]() |
VB problem for distiller 6 and excel 2003
I have used a code as shown below to create PDF file from excel. The
code doesn't work on the version of Excel 2003. Error message comes up at the line 'Set myPDF = New PdfDistiller' with 'Run-time error '-2147024893' Automation error The system cannot find the path specified'. VB can identify PdfDistiller as an object. Can somebody help me here please? Dim PSFileName As String Dim PDFFileName As String Dim LogFileName As String PSFileName = archive_file_path & "\a " & datestring & ".ps" PDFFileName = archive_file_path & "\a " & datestring & ".pdf" LogFileName = archive_file_path & "\a " & datestring & ".log" space_for_graph = space_for_graph - offset_space + const_space ' Generate postscript file from excel file Range("A1:P" & space_for_graph).PrintOut copies:=1, preview:=False, ActivePrinter:="Acrobat Distiller", printtofile:=True, collate:=True, prtofilename:=PSFileName ' convert the postscript file to .pdf Dim myPDF As PdfDistiller Set myPDF = New PdfDistiller myPDF.FileToPDF PSFileName, PDFFileName, "" Kill (PSFileName) |
All times are GMT +1. The time now is 07:22 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com