I've asked this in a previous thread some time ago but hoping someone may have come up with a solution.
If I print a VB document to the Adobe PDF print spooler the default filename that appears in the Save PDF File As dialog box is Microsoft Visual Basic.pdf
I can get other PDF print spoolers to rename the output file by using this code but not the Adobe spooler. Does anyone know how this could be done?
Code:Public Sub RenameJob(ByVal OldName As String, ByVal NewName As String) Dim vbPrinter As ApiPrinter Dim vbJob As ApiPrintJob Set vbPrinter = New ApiPrinter vbPrinter.DeviceName = Printer.DeviceName For Each vbJob In vbPrinter.PrintJobs 'If vbJob.DocumentName = OldName Then vbJob.DocumentName = NewName Exit For 'End If Next vbJob End Sub




Reply With Quote