Fax Software

Community Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • vikewings
    Member

    That’s the ticket! Thank you very much for your help.

    vikewings
    Member

    I am using version 10.03. Here’s my test code that I’ve been using to try to get this to work. With this code, a fax is created with a cover page and then a page containing the very basic output for the Printer object, but the PDF file referenced by AddAttachmentFile is not appended. Interestingly, if I comment out the PrinterObj lines and the .SetPrintFromApp(1) line, it creates a fax with a cover page and the PDF file. But I cannot get it to create a fax with BOTH the document created in the PrinterObj and the attached PDF file. It seems like this should work!?

    ==============================================

    Dim sendObj As Object
    Dim sdk_ret As Integer

    ‘Sets the printer object device setting to the Winfax “printer”
    PrinterObj.Device = “WinFax”
    ‘start the creation of the document output
    PrinterObj.Action = paStartDoc
    ‘add some text content to the document to be output by the PrinterObj
    PrinterObj.Text = “This is my test fax main document generated from vsPrinter object”
    ‘finish the document
    PrinterObj.Action = paEndDoc

    ‘create the Winfax SDK Send object
    Set sendObj = CreateObject(“WinFax.SDKSend”)

    sdk_ret = sendObj.SetHold(1)

    ‘append an attachment to the fax
    sdk_ret = sendObj.AddAttachmentFile(“c:DevMobileDataTemplatessurvey.pdf”)

    sdk_ret = sendObj.SetCompany(“AAA Test Co.”)
    sdk_ret = sendObj.SetTo(“Joe Test”)
    sdk_ret = sendObj.SetSubject(“Test faxing”)
    sdk_ret = sendObj.SetCoverFile(“C:Program FilesWinfaxCoverPericulum.cvp”)
    sdk_ret = sendObj.SetCoverText(“Test cover text”)
    sdk_ret = sendObj.SetUseCover(1)
    sdk_ret = sendObj.SetNumber(“5176477900”)
    sdk_ret = sendObj.AddRecipient
    sdk_ret = sendObj.SetPrintFromApp(1)
    sdk_ret = sendObj.Send(1)

    Do While sendObj.IsReadyToPrint = 0
    DoEvents
    Loop

    MsgBox “Done”

Viewing 2 posts - 1 through 2 (of 2 total)