Note that I am using Acrobat 4, NT4sp6, vb6sp5:
The following code works just fine:
Private Sub Command1_Click()
Dim pdf As New PdfDistiller
pdf.FileToPDF "d:\A16.eps", "", ""
End Sub
I had to add a reference to Acrobat Distiller (Acrodist.exe) to the project.
Maybe thats the difference?
Randy
> -----Original Message-----
> From: cheriot@m... [mailto:cheriot@m...]
> Sent: Friday, October 19, 2001 3:17 AM
> To: professional vb
> Subject: [pro_vb] Adobe PDFDistiller Automation runtime error 429
>
>
> I am using acrobat 5 on NT 4, developing in VB6.
>
> My project requires that I create pdf files from postscript.
>
> I am trying to use the the following function from a class module to
> achieve this on the client prior to deploying the class module as an exe
> dll on a server.
> ***********************************************************
> Public Function PStoPDF(ByVal NewFileOut As String)
>
> ''Take the individual .ps files and use distiller to change them to pdf's
> Dim pdfDist As ACRODISTXLib.PdfDistiller
> Dim DistilOk As Integer, FileIn As String, FileOut As String
> '
> FileIn = NewFileOut & "ps"
> FileOut = NewFileOut & "pdf"
> Set pdfDist = New ACRODISTXLib.PdfDistiller
> DistilOk = pdfDist.FileToPDF(FileIn, FileOut, "")
>
> End Function
> ***********************************************************
> the process hangs at the set command eventually returning:
> run-time error 429, active x can't create object
>
> Project references are loaded for acrobat distiller and adobePDFmakerX,
> all code is available from auto complete etc.
>
> any advice please?