System.Console.WriteLine("DecodeToDocArray failed") bRetVal = False GoTo ExitFun End If
objFaxDoc = New FaxDocumentClass() objFaxDoc.Bodies = docArray objFaxDoc.Sender.LoadDefaultSender() objFaxDoc.Recipients.Add(strNumber, "TestUser") Dim strJobIds As Object strJobIds = Nothing Dim iErrorIndex As Integer
iErrorIndex = objFaxDoc.ConnectedSubmit2(objFaxServer, strJobIds) If (iErrorIndex <> -1) Then System.Console.Write("ConnectedSubmit2 failed ErrorIndex = ") System.Console.Write(iErrorIndex) System.Console.WriteLine() bRetVal = False GoTo ExitFun End If Dim strArrJobIds As String() strArrJobIds = strJobIds System.Console.Write("Job ID : ") System.Console.Write(strArrJobIds(0)) System.Console.WriteLine() objFaxOutgoingJob2 = objFaxServer.Folders.OutgoingQueue.GetJob(strArrJobIds(0)) If (PrintJobStatus(objFaxOutgoingJob2) = False) Then System.Console.WriteLine("PrintJobStatus failed.") bRetVal = False GoTo ExitFun End If
Catch excep As Exception System.Console.WriteLine("Exception Occured") System.Console.WriteLine(excep.Message) End Try ExitFun: If (bConnected) Then objFaxServer.Disconnect() End If If (bRetVal = False) Then System.Console.WriteLine("Function Failed") End If End Sub
End Module End Namespace
|