Advertisement

02.21.2005 at 08:08PM PST, ID: 21323736
[x]
Attachment Details

Converting Excel sheets to a pdf in a macro

Asked by ComicalAli in Microsoft Excel Spreadsheet Software, Adobe Type Manager, ghostscript Font Software

Tags: , ,

Hi All,

I am writing a marco to convert an excel sheet to a pdf. I have looked at similar threads here and have nearly got it working however it is crashing on the last line with the error "Runtime error 429 Active X component cant create object." My understanding is that I dont have the correct dll registered an hence its the macro is not working. Is the so and what do I need to do to get this to work? I am using Acrobat 5 and Excel 2002. Thanks in advance!

Private Sub CommandButton1()
' Define the postscript and .pdf file names.
Dim PSFileName As String
Dim PDFFileName As String
PSFileName = "I:\PERFORM\Personal\Andrew\Pulse_Ladder_MB.ps"
PDFFileName = "I:\PERFORM\Personal\Andrew\Pulse_Ladder_MB.pdf"

' Print the Excel range to the postscript file
Dim MySheet As Worksheet
'MySheet = sT25MB
Set MySheet = ActiveSheet
MySheet.Range("A1:I31").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, ""

End SubStart Free Trial
[+][-]02.22.2005 at 02:07AM PST, ID: 13370095

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2005 at 02:10AM PST, ID: 13370108

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.22.2005 at 02:46PM PST, ID: 13376942

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.22.2005 at 04:50PM PST, ID: 13377666

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Excel Spreadsheet Software, Adobe Type Manager, ghostscript Font Software
Tags: excel, pdf, macro
Sign Up Now!
Solution Provided By: tmharvey
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.22.2005 at 10:38PM PST, ID: 13379542

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2005 at 05:59PM PST, ID: 13389106

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.23.2005 at 06:10PM PST, ID: 13389147

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.23.2005 at 06:30PM PST, ID: 13389249

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.25.2005 at 12:08AM PST, ID: 13400899

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.28.2005 at 04:44PM PST, ID: 13425216

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.28.2005 at 07:12PM PST, ID: 13425937

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.07.2005 at 08:24PM PST, ID: 13483453

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2005 at 10:30PM PST, ID: 13493463

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.08.2005 at 10:40PM PST, ID: 13493498

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.16.2005 at 04:50PM PST, ID: 13561223

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.16.2005 at 04:55PM PST, ID: 13561255

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32