Back to series

Private Sub Form_Load()
'Dim rfFaxAPI As RFCOMAPILib.FaxServer
Set rfFaxAPI = New FaxServer
rfFaxAPI.ServerName = txtServerName
rfFaxAPI.Protocol = cpNamedPipes
rfFaxAPI.AuthorizationUserID = txtUserID
rfFaxAPI.AuthorizationUserPassword = txtPassword
rfFaxAPI.UseNTAuthentication = False
txtToName = "
txtToFaxNumber = "

End Sub

Sub Send_Fax()
Dim newFax As RFCOMAPILib.Fax
Set newFax = rfFaxAPI.CreateObject(coFax)
newFax.ToName = txtToName
newFax.ToFaxNumber = txtToFaxNumber
newFax.ToVoiceNumber = txtToVoiceNumber
newFax.ToCompany = txtToCompany
newFax.ToCityState = txtToCityState
If chkPriority.Value = 1 Then newFax.Priority = fpHigh

If chkBillInfo1Counter.Value = 1 Then
newFax.BillingCode1 = "Fax Number " & X
Else
newFax.BillingCode1 = txtBillInfo1
End If
newFax.BillingCode2 = txtBillInfo2

newFax.MaximumRetries = 1

If (txtFile1.Text <> ") Then
newFax.Attachments.Add txtFile1.Text
End If

If (txtFile2.Text <> ") Then
newFax.Attachments.Add txtFile2.Text
End If

newFax.Send

lstStatus.AddItem "Your " & X & " fax is being sent to '" & newFax.ToName & "'"

End Sub