T
Tom van Stiphout
Hi All,
This one got me stumped. Under what conditions would similar late
binding code fail where the early binding code works?
I'm using Wndows XP, Access 2003, and Adobe Acrobat 6 Pro. All at
latest service pack. The goal is to convert a postscript file to a PDF
file using Distiller's FileToPDF method.
This early binding code works:
'Ensure you have a reference to Adobe.Distiller
Const PS_FILENAME As String = "c:\junk\junk.ps"
Const PDF_FILENAME As String = "c:\junk\junk.pdf"
Dim objDistiller As New ACRODISTXLib.PdfDistiller
objDistiller.FileToPDF PS_FILENAME, PDF_FILENAME, ""
Set objDistiller = Nothing
This late binding code does not work. Both GetObject and CreateObject
fail with Err=429=ActiveX component can't create object. I tried a
different machine - same problem.
Why?
Const PS_FILENAME As String = "c:\junk\junk.ps"
Const PDF_FILENAME As String = "c:\junk\junk.pdf"
Const DISTILLER_CLASS As String = "ACRODISTXLib.PdfDistiller"
Dim objDistiller As Object
On Error Resume Next
Set objDistiller = GetObject(, DISTILLER_CLASS) ' <==
Err=429=ActiveX component can't create object
If Err.Number <> 0 Then
Err.Clear
Set objDistiller = CreateObject(DISTILLER_CLASS) ' <==
Err=429=ActiveX component can't create object
If Err.Number <> 0 Then
Err.Clear
MsgBox "Unable to create Distiller object. Acrobat not
installed?", vbCritical
End If
End If
On Error GoTo 0
If Not objDistiller Is Nothing Then
objDistiller.FileToPDF PS_FILENAME, PDF_FILENAME, ""
End If
Set objDistiller = Nothing
Thanks for any insights,
-Tom.
This one got me stumped. Under what conditions would similar late
binding code fail where the early binding code works?
I'm using Wndows XP, Access 2003, and Adobe Acrobat 6 Pro. All at
latest service pack. The goal is to convert a postscript file to a PDF
file using Distiller's FileToPDF method.
This early binding code works:
'Ensure you have a reference to Adobe.Distiller
Const PS_FILENAME As String = "c:\junk\junk.ps"
Const PDF_FILENAME As String = "c:\junk\junk.pdf"
Dim objDistiller As New ACRODISTXLib.PdfDistiller
objDistiller.FileToPDF PS_FILENAME, PDF_FILENAME, ""
Set objDistiller = Nothing
This late binding code does not work. Both GetObject and CreateObject
fail with Err=429=ActiveX component can't create object. I tried a
different machine - same problem.
Why?
Const PS_FILENAME As String = "c:\junk\junk.ps"
Const PDF_FILENAME As String = "c:\junk\junk.pdf"
Const DISTILLER_CLASS As String = "ACRODISTXLib.PdfDistiller"
Dim objDistiller As Object
On Error Resume Next
Set objDistiller = GetObject(, DISTILLER_CLASS) ' <==
Err=429=ActiveX component can't create object
If Err.Number <> 0 Then
Err.Clear
Set objDistiller = CreateObject(DISTILLER_CLASS) ' <==
Err=429=ActiveX component can't create object
If Err.Number <> 0 Then
Err.Clear
MsgBox "Unable to create Distiller object. Acrobat not
installed?", vbCritical
End If
End If
On Error GoTo 0
If Not objDistiller Is Nothing Then
objDistiller.FileToPDF PS_FILENAME, PDF_FILENAME, ""
End If
Set objDistiller = Nothing
Thanks for any insights,
-Tom.