Fax Software

Community Forums

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #2519

    I have written the vb.net code below. Basically I loop through a dataset of faxes that need to be sent. At the time of faxing, I run this code which then loops through a list of attachments that need to be sent to this person. That all works fine – the fax seems to be sent perfectly to WinFax. My problem is that when I call the “.GetEntryID(0)” it will always pull the EntryID from the first fax sent to WinFax. Can anyone tell what I’m doing wrong in this code? I’m using the “.IsEntryIDReady(0)” and WinFax does seem to have an EntryID ready, but it is not always the updated ID#. Any help is greatly appreciated.

    Dim objwinfaxsend2 As New wfxctl32.CSDKSend()

    With objwinfaxsend2
    Dim CurrentId, NewId As String
    CurrentId = .GetEntryID(0)
    NewId = .GetEntryID(0)

    .SetTime(Format(Date.Today, “HH:mm:ss”))
    .SetTo(DsMain1.Tables(“Employer”).Rows(0).Item(“Employer_First_Name”) & ” ” & DsMain1.Tables(“Employer”).Rows(0).Item(“Employer_Last_Name”))

    ‘Loop through attachment table if there are any attachments
    If DsMain1.Tables(“Fax_Email_Attachment”).Rows.Count > 0 Then
    Dim drAttach As DataRow
    For Each drAttach In DsMain1.Tables(“Fax_Email_Attachment”).Rows
    End If


    Dim ret As String = .Send(1)

    If ret <> 0 Then
    MsgBox(“There was an error sending the fax job to WinFax”, vbOKOnly)
    Exit Sub
    ‘MsgBox(“Fax has been sent!”, vbInformation)
    End If

    ‘Wait for the Fax ID be ready
    Do Until .IsEntryIDReady(0) = 1

    dr.Item(“Fax_Id”) = .GetEntryID(0)


    objwinfaxsend2 = Nothing

    End With

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.