如何在发送传真时选择特定的调制解调器?

时间:2012-12-27 05:40:23

标签: vb.net fax winfax

我正在编写一份应用程序来发送传真给FAXCOMEXLib。我用了这段代码:

Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
Dim JobID As Object

Try
    objFaxServer.Connect(txtFaxServer.Text)

    objFaxDocument.Body = Me.txtFile.Text
    objFaxDocument.DocumentName = "My First Fax"
    objFaxDocument.Recipients.Add(Me.txtNumber.Text, "")
    objFaxDocument.AttachFaxToReceipt = True
    objFaxDocument.Note = "Here is the info you requested"
    objFaxDocument.Subject = Me.txtFaxID.Text
    objFaxDocument.ReceiptAddress = "test@tin.it"
    objFaxDocument.CoverPageType = FAXCOMEXLib.FAX_COVERPAGE_TYPE_ENUM.fcptNONE
    objFaxDocument.Priority = FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptNORMAL
    objFaxDocument.ReceiptType = FAXCOMEXLib.FAX_RECEIPT_TYPE_ENUM.frtMAIL
    objFaxDocument.ScheduleType = FAXCOMEXLib.FAX_SCHEDULE_TYPE_ENUM.fstNOW

    JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

    objFaxServer.Disconnect()

    'MessageBox.Show("The Job ID is :" & JobID(0), "Information")
Catch ex As Exception
    MessageBox.Show(ex.ToString, "Error")
End Try

我有两个调制解调器(Modem1或Modem2)。使用此代码时,第一个可用的调制解调器将执行传真。

但我需要根据我的规则使用Modem1或Modem2发送传真。如何选择特定的调制解调器来发送传真?

0 个答案:

没有答案