How to print a PDF from an excel VBA macro using Foxit PDF SDK Pro?

Frank Van Eygen 1 Reputation point
2022-03-25T10:50:57.307+00:00

I am trying to write an excel VBA macro to print a PDF without opening it. I have added a reference to my VBAProject with the FoxitPDFSDK Pro module.
The code I have so far does not do anything. I also cannot find any help about this online.

Sub Test_Foxit_Print()
    Dim s As String
    Dim sCmd As String
    Dim PDFPrinter As FoxitPDFSDKProLib.PDFPrinter
    Dim sPDFfile As String

    Set PDFPrinter = CreateObject("FoxitPDFSDKProLib.PDFPrinter")

    sPDFfile = "C:\Users\frank.van.eygen\Documents\PDF files\Test Frank.pdf"
    Call PDFPrinter.printWhat(0, sPDFfile)
    Call PDFPrinter.PrintQuiet(sPDFfile)

End Sub

Can somebody help me please?
Frank

0 comments No comments
{count} votes