LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Print to PDF using Adobe Acrobat 6.0

Hi All

I am trying to automate the printing of PDF files from Excel - I have
found a lot of posts on this topic and none seem to answer my problems
on how to do this and I am running into a bunch of problems - here is
what I am usnig and I what I have so far:


Excel 2003
Adobe Reader and Distiller 6.0


I understand that you have to create a postscript file first and then
using distiller create the pdf file


I am having problems doing both:


HEre is the code I am using (modified from another post I found)


' Define the postscript and .pdf file names.
Dim PSFileName As String
Dim PDFFileName As String


PSFileName = "C:\Test.PS"
PDFFileName = "C:\Test.PDF"


'Print the Excel range to the postscript file
Dim MySheet As Worksheet
Set MySheet = ActiveSheet
MySheet.PrintOut copies:=1, preview:=False, ActivePrinter:="Adobe
PDF", printtofile:=True, collate:=True, prtofilename:=PSFileName


' Convert the postscript file to .pdf
Dim myPDF As PdfDistiller
Set myPDF = New PdfDistiller
myPDF.FileToPDF PSFileName, PDFFileName, ""


When I try to create the ps file I get an error in my Print Cue and
it
wont print anything - in the print cue it says it is trying to print
to Port 'MyDocuments\*.pdf;


Questions
Is 'Adobe PDF' the Adobe PostScript print drive I am supposed to be
using?
Is there something in my Adobe settings that might be causing the
problem?


Next I have a PostScript file (taken from an Adobe Sample) that I was
trying to use the last half of my code to use the distiller to create
a PDF - here I am getting this error:


Run-Time Error '429'
ActiveX component can't create object


I have a reference to Adobe Distiller in my VBA project so I am not
sure what is causing this error.


So in a nutshell my problem is twofold - I cant create a postscript
file and I cant create a PDF from a PostScript file


Any assistance would be greatly appreciated - if you need any more
details please let me know


Thanks,


Jeff


 
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
can't print to adobe acrobat georgef Charts and Charting in Excel 2 July 4th 08 04:52 AM
Adobe Acrobat DKS1 Excel Discussion (Misc queries) 5 July 13th 05 07:10 PM
how to re install Adobe Acrobat in Excel? The adobe Acrobat work. Execl error Excel Discussion (Misc queries) 1 March 17th 05 02:29 AM
Print to Adobe Acrobat (2 ws to one file) Michael McClellan Excel Programming 2 June 2nd 04 10:10 AM
Automate Adobe Acrobat? pk Excel Programming 1 October 27th 03 07:11 PM


All times are GMT +1. The time now is 02:06 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"