Fax Software

Community Forums

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2592
    jd576
    Member

    Okay, I have a VB6 project that uses the CSDK object for faxing. I usually create the text, add it to my selected coverpage, and send it. This works with WinFax 10.0 and 10.02U on Win XP and Win2000 systems. Lots of use, no problems.

    I am aware of the various SDK issues with versions, but I have actually had no problems running my code on many different installations of Win2000 and XP — until now.

    I cannot get the CSDKSend.SetPrintFromApp (1) to work.

    It sends the printed form to WinFax, but DOES NOT seem to accept the various options that have been set prior to .Send(0)

    WinFax version 10.02U pops up a message box telling me I have not entered a coverpage. WinFax 10.0 pops up the messenger on the Send page, where my printed file exists as a page two, with a blank page one quickcover page — none of the recipient info set on the send object is being hooked up with this form.

    Here is my basic code:

    Set oWinFax = New CSDKSend

    oWinFax.SetUseCover (1)
    oWinFax.SetCoverFile (sCoverPage)
    oWinFax.SetCoverText (sCovertext)

    oWinFax.SetSubject (“Subject text”)

    oWinFax.SetTo (“Name”)
    oWinFax.SetNumber (“555-1111”)
    oWinFax.SetAreaCode (“555”)

    oWinFax.SetPrintFromApp (1)

    oWinFax.Send (0)

    …. at this point a form is printed to the WinFax messenger and then after printing, the oWinFax object is set to nothing.

    But none of the oWinFax.Sets are being recognized.

    With the exception of the .SetPrintFromApp property — which I am using newly here — all of this codes works fine in my other uses production uses. Again, I have tried this on both 10.0 and 10.02U — I use 10.0 in my production system.

    Any ideas? Thanks!

    #4384
    Anonymous
    Member

    What application are you printing/faxing the form, is it Microsoft Word?

    #4385
    jd576
    Member

    I create the form entirely within VB6 using VB6 print methods, then send it. The printed form is being transfered properly, and appears in WinFax complete. It is just the recipient setup that is not transfering. Also the print function seems to work fine with multiple systems and printer drivers without problem — it seems to have no problem printing to winfax driver.

    To the code posted above, I should note that after adding recipient info, I send the oWinFax.AddRecipient command. If I check oWinFax.GetRecipientCount, I find the recipient has been added on the object. But after the form print, I am taken to the WinFax Send screen, where I find empty recipient info and failure to use the requested coverpage (which does exist and is available).

    I can make the sample program in SKDSend material (from WinFax) work properly, printing from notepad.

    My question is if there is a property of the object that I am not setting that might make a difference. I have tried setting just about all the properties (which I have always previously just left at default, as in the above code) without success.

    Thanks.

    #4386
    Anonymous
    Member

    @jd576 wrote:

    Set oWinFax = New CSDKSend

    oWinFax.SetUseCover (1)
    oWinFax.SetCoverFile (sCoverPage)
    oWinFax.SetCoverText (sCovertext)

    oWinFax.SetSubject (“Subject text”)

    oWinFax.SetTo (“Name”)
    oWinFax.SetNumber (“555-1111”)
    oWinFax.SetAreaCode (“555”)

    oWinFax.SetPrintFromApp (1)

    oWinFax.Send (0)

    …. at this point a form is printed to the WinFax messenger and then after printing, the oWinFax object is set to nothing.

    But none of the oWinFax.Sets are being recognized.

    With the exception of the .SetPrintFromApp property — which I am using newly here — all of this codes works fine in my other uses production uses. Again, I have tried this on both 10.0 and 10.02U — I use 10.0 in my production system.

    Any ideas? Thanks!

    Try this code…

    Set oWinFax = New CSDKSend

    oWinFax.SetUseCover (1)
    oWinFax.SetCoverFile (sCoverPage)
    oWinFax.SetCoverText (sCovertext)
    oWinFax.SetSubject (“Subject text”)
    oWinFax.SetTo (“Name”)
    oWinFax.SetNumber (“555-1111”)
    oWinFax.SetAreaCode (“555”)
    oWinFax = objWinFaxSend.AddRecipient()

    oWinFax.SetPrintFromApp (1)
    oWinFax.Send (1)
    oWinFax.ShowSendScreen(0)

    Do While oWinFax.IsReadyToPrint = 0
    DoEvents
    Loop

    ‘ print your document here, make sure WinFax is the
    ‘ current printer driver, you might want to switch it back
    ‘ to the original driver after you are done.

    ‘ wait until winfax is ready.
    Do While oWinFax.IsEntryIDReady(0) <> 1
    DoEvents
    Loop

    You should try this on your 10.0 system. The 10.02 version might have problems under Windows XP

    #4387
    jd576
    Member

    Thank you for the comments. I discovered the problem, and it is not within the code.

    For some reason, if I set the oWinFax object within the VB program and then print from within the same program, the above stated problem occurs.

    BUT if instead of printing from within the program, I shell out to a different small .exe routine and have it print the form — then all works well.

    So I compiled the print routine into a small exe, I shell to it with the print parameters, it exits after printing to the WinFax printer, then from within the calling program I close the object and quit the fax print.

    This works. I have no idea why I cannot set the object and print from within the same program, but this seems to be the case.

    Took 12 hours to figure this out. I hope it is of help to others.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.