Fax Software

Community Forums

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Winfax 10, XP & .NET – SDK Questions for .NET #4380
    chrisb01
    Member

    Here’s a post from another forum, which seems to confirm my hopes that the 10.03 SDK is fixed (with regard to XP): http://www.anzio.com/forum/74.html

    in reply to: Winfax 10, XP & .NET – SDK Questions for .NET #4378
    chrisb01
    Member

    Here’s the code I use to send PDF documents to Winfax via the SDK. This code did not previously work on XP, but it seems to work fine now with on XP with 10.03. This is not the program in it’s entirety, but this is the code that pertains to faxing my PDF documents. All the variables starting with “am” and “xfr”, as well as the QP object, are arguments to this function. I use this function to send hundreds of PDFs to Winfax with no user interface whatsoever. The PDF files are created with the fax number in the file name.

    Dim objWinfaxSend, sAcroExe, currentime, shortFileName

    Dim scriptSuccess, errNum, errDesc
    scriptSuccess = False
    On Error GoTo exceptionHandler

    Set objWinfaxSend = CreateObject(“WinFax.SDKSend8.0”)

    objWinfaxSend.LeaveRunning()
    objWinfaxSend.ShowSendScreen(0)
    objWinfaxSend.SetPreviewFax(0)
    objWinfaxSend.SetResolution(1)
    If UCase(Trim(xfrFaxUseCover)) = “Y” Then
    objWinfaxSend.SetUseCover(0)
    objWinfaxSend.SetQuickCover(1)
    objWinfaxSend.SetCoverText (QP.GetInformation(4))
    ElseIf Len(Trim(xfrFaxUseCover)) > 1 Then
    objWinfaxSend.SetQuickCover(0)
    objWinfaxSend.SetUseCover(1)
    objWinfaxSend.SetCoverFile (“C:Program FilesWinFaxCoverBASIC1.CVP”)
    objWinfaxSend.SetCoverText (QP.GetInformation(4))
    Else
    objWinfaxSend.SetQuickCover(0)
    objWinfaxSend.SetUseCover(0)
    End If

    ‘ Add Recipient
    shortFileName = ExtractFileName(amXfrFile)
    If xfrFaxDialLocationName = “Dial as entered” Then
    objWinfaxSend.SetNumber (Mid(shortFileName,5,(Len(shortFileName) – 8)))
    Else
    objWinfaxSend.SetAreaCode (Mid(shortFileName,5,3))
    objWinfaxSend.SetNumber (Mid(shortFileName,8,(Len(shortFileName) – 11)))
    End If
    objWinfaxSend.SetTo (QP.GetInformation(2))
    objWinfaxSend.SetSubject (QP.GetInformation(3))

    If UCase(xfrFaxDelay) = “OFFPEAK” Then
    objWinfaxSend.SetOffPeak(1)
    ElseIf InStr(xfrFaxDelay,”:”) <> 0 Then
    If Format$(xfrFaxDelay,”hh:nn:ss”) < Format$(Time(),"hh:nn:ss") Then
    objWinfaxSend.SetDate (Format$(DateAdd(“d”,1,Date()),”mm/dd/yy”))
    Else
    objWinfaxSend.SetDate (Format$(Date(),”mm/dd/yy”))
    End If
    objWinfaxSend.SetTime (Format$(xfrFaxDelay,”hh:nn:ss”))
    ElseIf CDbl(xfrFaxDelay) > 0 Then
    objWinfaxSend.SetDate (Format$(Date(),”mm/dd/yy”))
    objWinfaxSend.SetTime (Format$(DateAdd(“n”,CDbl(xfrFaxDelay),Time()),”hh:nn:ss”))
    End If
    objWinfaxSend.SetPriority(3)
    objWinfaxSend.AddRecipient

    ‘ Add Documents via Print
    objWinfaxSend.SetPrintFromApp(1)

    ‘ Set Winfax to Send
    objWinfaxSend.Send (1)
    currentime = Timer()
    Do Until objWinfaxSend.IsReadyToPrint()
    ‘ Max timeout at 120 seconds
    If Timer() – currentime >= 120 Then
    Err.Raise 1,,”Timeout printing to Winfax printer.”
    Else
    Sleep 1
    End If
    Loop

    ‘ Find Acrobat Reader
    sAcroExe = RegRead(“HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp PathsAcroRd32.exe”)

    ‘ If not here, find Acrobat
    If sAcroExe = “” Then
    sAcroExe = RegRead(“HKLMSOFTWAREMicrosoftWindowsCurrentVersionApp PathsAcrobat.exe”)
    End If

    ‘ If no Acrobat Reader or Acrobat, can’t print so quit with error
    If sAcroExe = “” Then
    Err.Raise 1,,”Adobe Acrobat or Acrobat Reader must be installed.”
    End If

    ‘ Print the PDF file to the Winfax printer
    Shell sAcroExe & ” /t “”” & amXfrFile & “”” “”Winfax”””,vbNormalFocus

    ‘ Wait til fax is in outbox before continuing
    currentime = Timer()
    Do Until objWinfaxSend.IsEntryIDReady(0)
    ‘ Max timeout at 240 seconds
    If Timer() – currentime >= 240 Then
    Err.Raise 1,,”Timeout waiting for Winfax EntryID.”
    Else
    Sleep 1
    End If
    Loop

    scriptSuccess = True

    exceptionHandler:
    If Not scriptSuccess Then
    errNum = Err.Number
    errDesc = Err.Description
    End If

    ‘ Always attempt clean up
    On Error Resume Next
    objWinfaxSend.Done ()
    Set objWinfaxSend = Nothing
    sAcroExe = Empty
    On Error GoTo 0

    If Not scriptSuccess Then
    Err.Raise errNum,,errDesc
    End If

    in reply to: Winfax 10, XP & .NET – SDK Questions for .NET #4373
    chrisb01
    Member

    Guys, I had created a faxing script which utilized objects in the SDK that appeared to be affected by this “SDK bug”. That script did not run successfully under Winfax 10.02, but it appears to run under 10.03. There are some posts here that appear to “speculate” that the SDK is still broken in 10.03, but I was wondering if anyone has done some testing and come to a definitive conclusion on the matter.

    I was running Winfax 10.03 on Windows XP Professional SP1 when the faxing script ran successfully.

    chrisb01
    Member

    Is there any way to revert a 10.02 installation to a 10.00 version… or at leat just the SDK dlls??

    I have 10.00 on Windows 2000, but I developed a VB script to do faxing on customers systems… I can’t control what version they get, so they sometimes get 10.02 and install it on XP. Perhaps if I overlay their SDK dll’s with my 10.00 ones, then I get get it working?

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