I am trying to convert Crystal Reports 6.0 (.rpt) files to PDF and am using batchconvert property to convert it. However, the Visual Basic 5.0 application hangs on the BatchConvert line. Any ideas?
I am using Amyuni PDF Converter Pro v.2.08a.
Here is a code snippet:
strPDFFileName = Trim(FilePath) + Trim(Dest_Document_Name) & ".pdf"
Set fsofile = CreateObject("TMFSO.File")
If Not fsofile.FileExists(strPDFFileName) Then
Set PDFPrinter = CreateObject("CDINTF.CDINTF")
'Adds a new printer
PDFPrinter.DriverInit PDF_PRINTERNAME
'Set Paper Size and Orientation
PDFPrinter.PaperSize = 1 'standard Letter 8 1/2 x 11 inch
PDFPrinter.Orientation = 1 'Portrait
'Compression Range is 1 to 9
PDFPrinter.JPegLevel = 1
'Set Default Configuration for all applications
PDFPrinter.SetDefaultConfig
'Set printer as default
PDFPrinter.SetDefaultPrinter
'Set Default Directory
PDFPrinter.DefaultDirectory = FilePath
'Set Default FileName
PDFPrinter.DefaultFileName = strPDFFileName
'Set Options (NoPrompt + UseFileName)
PDFPrinter.FileNameOptions = 1 + 2
'Printout
'strSourceFileName = strFileName
PDFPrinter.BatchConvert Dest_Document_Name + ".rpt"
'Reset all options before returning
PDFPrinter.FileNameOptions = 0
'Remove PDFPrinter
Set PDFPrinter = Nothing
End If
BatchConvert hangs
-
- Posts: 3
- Joined: Thu Jun 09 2005