Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and paste problem Excel 2003 to Word 2003 [email protected] Excel Discussion (Misc queries) 2 August 28th 07 11:14 AM
VB problem for distiller 6 and excel 2003 VB idiot Excel Programming 0 November 24th 06 11:02 AM
Add reference to Acrobat Distiller Ana Excel Programming 1 May 3rd 06 01:45 PM
Excel formatting and Acrobat Distiller Krystal Excel Programming 1 May 23rd 05 06:55 PM
Problems with Excel XP SP2 and Acrobat Distiller Kevin Hammond Excel Programming 0 March 2nd 04 04:07 PM


All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"