I call the printing Sub with the following: Call PrintEmailwithBullzip(strPutInFolder, Filename)
I check Runonce.ini each time thru the loop (the test folder has four emails in it) and the output value is correct each time. Here's an example of the output line: Output=C:\Cases\_Process\CE RE- Thank You for Your Payment - AccountNotify to EBF - 20130127 16-21.pdf
Below you can see some of the many combinations I've tried. Nothing is created. I've left in all commented out code from various tries.
Sub PrintEmailwithBullzip(ByVal strPutInFolder, ByVal Filename As String)
Dim fso As New FileSystemObject
Dim cff As New Bullzip.PDFPrinterSettings
Dim cmd As String
cff.SetPrinterName ("Bullzip PDF Printer")
'Set fldr = fso.GetFolder(currentdir & "\in")
'cnt = 0
'For Each F In fldr.Files
With cff
'Output = strPutInFolder & Filename & ".pdf"
Rem -- Set the values
.Init
.SetValue "Output", strPutInFolder & Filename & ".pdf"""
.SetValue "ShowSettings", "never"
.SetValue "ShowPDF", "no"
.SetValue "WatermarkText", Now
.SetValue "ShowProgress", "yes"
.SetValue "ShowProgressFinished", "no"
.SetValue "SuppressErrors", "no"
.SetValue "ConfirmOverwrite", "no"
Rem -- Write settings to the runonce-Invoice.ini
.WriteSettings True
End With
Rem -- Print the document
'PrintFile = strPutInFolder & Filename & ".pdf"
'cmd = "C:\Media\Bullzip\printto.exe " & Outlook.Application.ActiveExplorer.CurrentFolder.Item & " ""Bullzip PDF Printer"""
cmd = "C:\Media\Bullzip\printto.exe " & "C:\Media\Bullzip\license.txt" & "Bullzip PDF Printer"
Call Shell("C:\Windows\system32\cmd.exe " & cmd, 0)
'Call Shell("C:\Windows\system32\cmd.exe" /c & cmd, 0)
''Call Shell("C:\Media\Bullzip\printto.exe " & Outlook.Application.ActiveExplorer.CurrentFolder.Item & " ""Bullzip PDF Printer""", 0)
'Call Shell("C:\Media\Bullzip\printto.exe " & "This is a test" & " ""Bullzip PDF Printer""", 0)
'Call Shell("C:\Media\Bullzip\printto.exe "C:\Media\Bullzip\license.txt" " ""Bullzip PDF Printer""", 0)
'Call Shell("C:\Media\Bullzip\printto.exe" "C:\Media\Bullzip\license.txt" "Bullzip PDF Printer", 0)
'Outlook.Application.ActiveExplorer.CurrentFolder.Item
'Application.Wait (Now + TimeValue("0:00:01"))
End Sub
Can't get printto syntax correct
Moderator: jr