
The problem is that when I send the print job off, it is hit or miss as to wether it works or not. I have code already to launch Acrobat to print the document which I will include here for anyone that is interested. With Acrobat Reader, you can then print the merged document. Launching one of these files will merge the data from this XML file into an existing PDF Form file. RE: How to print PDF-files from within a VB application.I have a VB program that spits out. Hope it helps, MS and Adobe really should be ashamed of their selves. Private Const OPTIONS_EXT = ".joboptions" Private Const ACROBAT_APP = "Software\Adobe\Adobe Acrobat\5.0\InstallPath"

TxtActions = txtActions & "ConvertFiles" & vbCrLf & "Error Number: " & Err.Number & vbCrLf & "Error msg: " & Err.Description & vbCrLf & Err.Source & vbCrLf 'This is going to be a kill stmnt to clean out the "IN" folder

TxtFilesUploaded = intNumberOfFilesCopied TxtActions = txtActions & Record(intCounter).aryFileNames(intFileCounter) & " converted" & vbCrLf PdfDist.FileToPDF "\\forThePSFile\In\" & Mid(Record(intCounter).aryFileNames(intFileCounter), 1, 8), "\\forThePDF\Out\", optionsFile Set Doc = Wrd.Open(strFrom & Record(intCounter).aryFileNames(intFileCounter))ĭoc.PrintOut 0, 0, 0, OutputFileName:="\\folderForThePSFile\In\" & Mid(Record(intCounter).aryFileNames(intFileCounter), 1, 8) TxtActions.SelStart = Len(txtActions) 'at the end of the sreadsheet, will show an error, its at EOF TxtActions = txtActions & "Converting " & Record(intCounter).aryFileNames(intFileCounter) & vbCrLf If Record(intCounter).strPublish = "Yes" Thenįor intFileCounter = 1 To Record(intCounter).intNumberOfFiles Word.ActivePrinter = "HP LaserJet 5/5M PostScript" Set Wor = CreateObject("Word.Application")

'open word, create ps, launch distiller,clean out "IN"ĭim intCounter, intFileCounter As Integerĭim Dist As ACRODISTXLib.PdfDistiller 'calls distiller. There is a download on the MS site to correct this problem, look at: " " Just as a side note, do you realize that VB6 is not compatable with VB5? If you are upgrading to VB6 from 5 you may loose some of your dll's depending on the dll being used.

Here is a section of code for that process. I use a VB program to read an excel spreadsheet, if pub col = yes then I open word, call the PSPrinter, the distiller and post to the web. You have to call the distiller to convert to a PDF. You have to have a PSPrinter to connect the two fo them.
