Forum Replies Created
-
AuthorPosts
-
February 16, 2006 at 2:10 am in reply to: SetPrintFromApp and AddAttachmentFiles – Are mutually exclusive? #4284vikewingsMember
That’s the ticket! Thank you very much for your help.
February 15, 2006 at 11:14 pm in reply to: SetPrintFromApp and AddAttachmentFiles – Are mutually exclusive? #4282vikewingsMemberI 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
LoopMsgBox “Done”
-
AuthorPosts