Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I need to send the reports to pdf.. i have pdf creator installed .How can i acheive this
Any help would be appreciated
Export in xls or other format but when you print use pdf printer
Hi Alessandro,
I need macro to export all my reports in to pdf. when i print the reports have my pdf creator installed in my PC
so if i print,, a pdf will generate in my PC
1. Install Bullzip PDF Printer
2. Then use below macro
Sub CreateReport
'ActiveDocument.Sheets("SH01").Activate
'ActiveDocument.reload
vReport = "RP01" 'Set report
vName = "Pdf Report" 'Name of output pdf
ActiveDocument.PrintReport(vReport),"Bullzip PDF Printer",false 'Printreport
reportFile = "D:\" & vName &".pdf" 'Setting outputname
MyPrintPDFWithBullZip(reportFile) 'Call pdf printer
'ActiveDocument.Sheets("SH01").Activate
MyPrintPDFWithBullZip_Transaction(File_Transaction) 'Call pdf printer
ActiveDocument.GetApplication.Sleep 5000
'mailrapport
'SendMail
ActiveDocument.Save
ActiveDocument.GetApplication.Sleep 5000
'ActiveDocument.GetApplication.Quit
End sub
FUNCTION MyPrintPDFWithBullZip(pdfOutputFile)
'set obj = CreateObject("Bullzip.PDFPrinterSettings")
set obj = CreateObject("Bullzip.PdfSettings")
obj.PrinterName = "Bullzip PDF Printer"
obj.SetValue "Output" , pdfOutputFile
obj.SetValue "ConfirmOverwrite", "no"
obj.SetValue "ShowSaveAS", "never"
obj.SetValue "ShowSettings", "never"
obj.SetValue "ShowPDF", "no"
obj.SetValue "RememberLastFileName", "no"
obj.SetValue "RememberLastFolderName", "no"
obj.SetValue "ShowProgressFinished", "no"
obj.SetValue "ShowProgress", "no"
obj.WriteSettings True
msgbox "PDF Created"
END FUNCTION
Let me know if you need any more help on this .