請求幫忙----FAX接收如何接收? |
尚未結案
|
blockman
一般會員 發表:9 回覆:0 積分:1 註冊:2003-10-13 發送簡訊給我 |
小弟在這裡有一些問題想請求協助 就是我是使用微軟的 Faxcomex.lib技術來作fax的收發 目前對於fax的接收有遇到瓶頸 就是我使用faxincoming來接收資料 可是在objFaxIncomingJob = collFaxIncomingJobs.Item(n)
卻沒辦法由數據機中接收到檔案 反而開啟的microsoft的傳真主控台來接收 想請問就是要如何避免啟動傳真主控台來接收傳真進來的資料 以下是程式碼 Private Sub datareceive() Dim objFaxServer As New FAXCOMEXLib.FaxServer
Dim collFaxIncomingJobs As FAXCOMEXLib.FaxIncomingJobs
Dim objFaxIncomingJob As FAXCOMEXLib.FaxIncomingJob
Dim A As Object
Dim Prefetch As Integer
Dim FileName As String 'Error handling
On Error GoTo Error_Handler 'Connect to the fax server
objFaxServer.Connect("") 'Get the collection of jobs in the incoming queue
collFaxIncomingJobs = objFaxServer.Folders.IncomingQueue.GetJobs 'Display the number of jobs in the collection
MsgBox("There are " & collFaxIncomingJobs.Count & " jobs in the incoming queue.") archive() '訊息的顯示抓取 Dim n As Long 'Get the job
n = InputBox("Input the item number for which you want information.")
objFaxIncomingJob = collFaxIncomingJobs.Item(n) objFaxIncomingJob.Refresh() ''Display the job properties
MsgBox("Available operations: " & objFaxIncomingJob.AvailableOperations & _
vbCrLf & "Caller ID: " & objFaxIncomingJob.CallerId & _
vbCrLf & "CSID: " & objFaxIncomingJob.CSID & _
vbCrLf & "Current page: " & objFaxIncomingJob.CurrentPage & _
vbCrLf & "Device ID: " & objFaxIncomingJob.DeviceId & _
vbCrLf & "Extended status: " & objFaxIncomingJob.ExtendedStatus & _
vbCrLf & "Extended status code : " & objFaxIncomingJob.ExtendedStatusCode & _
vbCrLf & "Job ID: " & objFaxIncomingJob.Id & _
vbCrLf & "Job type: " & objFaxIncomingJob.JobType & _
vbCrLf & "Retries: " & objFaxIncomingJob.Retries & _
vbCrLf & "Routing information: " & objFaxIncomingJob.RoutingInformation & _
vbCrLf & "Size: " & objFaxIncomingJob.Size & _
vbCrLf & "Status: " & objFaxIncomingJob.Status & _
vbCrLf & "Transmission start: " & objFaxIncomingJob.TransmissionStart & _
vbCrLf & "Transmission end: " & objFaxIncomingJob.TransmissionEnd & _
vbCrLf & "TSID: " & objFaxIncomingJob.TSID) 'Allow user to cancel the selected fax
Dim CancelString As String
CancelString = InputBox("Cancel this fax (Y/N)?")
If CancelString = "Y" Then objFaxIncomingJob.Cancel() 'Allow user to open the selected fax
Dim OpenString As String
OpenString = InputBox("Open this fax (Y/N)?")
If OpenString = "Y" Then
FileName = InputBox("Provide path and name of file for TIFF copy, e.g. c:\MyFax.tiff")
objFaxIncomingJob.CopyTiff(FileName) 'Open the tiff file
'Dim A As Object
A = CreateObject("wscript.shell")
A.run(FileName)
End If
Exit Sub Error_Handler:
'Implement error handling at the end of your subroutine. This implementation is for demonstration purposes
MsgBox("Error number: " & Hex(Err.Number) & ", " & Err.Description) End Sub 請大大們可以指點迷津
|
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |