全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1363
推到 Plurk!
推到 Facebook!

Faxerver要如何接收資料

尚未結案
blockman
一般會員


發表:9
回覆:0
積分:1
註冊:2003-10-13

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-11-30 10:39:59 IP:218.162.xxx.xxx 未訂閱
各位大大,我在msdn上找到了一個faxserver的範例程式經過測試後可以傳送資料    那我想要也寫一個可以接收資料的程式    但找了很多還是找不到一些相關的資料    那以下程式碼是找到的傳送程式,請大大給我的方向或是哪裡有參考資料能夠讓我做個參考 (我是使用VB撰寫,因為這裡沒有VB 討論區所以張貼於此)    Dim FaxDocumentObj As New FAXCOMEXLib.FaxDocument    Dim FaxServerObj As New FAXCOMEXLib.FaxServer    Dim JobIDObj As Variant Private Sub Command1_Click()       'Error handling.    On Error GoTo Error_Handler       'Connect to the fax server.    FaxServerObj.Connect ""       'Set the fax body.    FaxDocumentObj.Body = "D:\VB\1txt"       'Name the document.    FaxDocumentObj.DocumentName = "First Fax"       'Set the fax priority.    'FaxDocumentObj.Priority = fptHIGH       'Add the recipient with the fax number 2065552626.    FaxDocumentObj.Recipients.Add (Text1.Text), "" 'Choose to attach the fax to the fax receipt. FaxDocumentObj.AttachFaxToReceipt = True 'Set the cover page type and the path of the cover page. 'FaxDocumentObj.CoverPageType = fcptSERVER FaxDocumentObj.CoverPage = "generic" 'Provide the cover page note. FaxDocumentObj.Note = "This contains the information you requested." 'Provide the address for the fax receipt. FaxDocumentObj.ReceiptAddress = "someone@example.com" 'Set the receipt type to e-mail. 'FaxDocumentObj.ReceiptType = frtMAIL 'Specify that the fax is to be sent at a particular time 'FaxDocumentObj.ScheduleType = fstSPECIFIC_TIME 'CDate converts the time to the Date data type FaxDocumentObj.ScheduleTime = CDate("6:25:12 PM") FaxDocumentObj.Subject = "Today's fax" 'Set the sender properties. FaxDocumentObj.Sender.Title = "Mr." FaxDocumentObj.Sender.Name = "吳禮吉" FaxDocumentObj.Sender.City = "Sender_City" FaxDocumentObj.Sender.State = "Sender_State" FaxDocumentObj.Sender.Company = "Sender_Company" FaxDocumentObj.Sender.Country = "Sender_Country" FaxDocumentObj.Sender.Email = "someone@somewebsite.com" FaxDocumentObj.Sender.FaxNumber = "4255550167" FaxDocumentObj.Sender.HomePhone = "4255550987" FaxDocumentObj.Sender.OfficeLocation = "My_Location" 'FaxDocumentObj.Sender.OfficePhone = "4255550334" FaxDocumentObj.Sender.StreetAddress = "123 Main Street" FaxDocumentObj.Sender.TSID = "Office Fax" FaxDocumentObj.Sender.ZipCode = "44118" FaxDocumentObj.Sender.BillingCode = "23A54" FaxDocumentObj.Sender.Department = "Accts Payable" 'Save sender information as default. FaxDocumentObj.Sender.SaveDefaultSender 'Submit the document to the connected fax server, and retrieve the job ID. JobIDObj = FaxDocumentObj.ConnectedSubmit(FaxServerObj) MsgBox "The Job ID is :" & JobIDObj(0) 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 (欲做成一個定時器,固定時間執行接收) Private Sub Form_Load() Receive() = Timer1 End Sub (接收部分的部分並不是很瞭解,請大大可以給的方向參考嗎) Private Sub Receive() Dim FaxReceiveObj As FAXCOMEXLib.FaxRecipient On Error GoTo Error_Handler FaxServerObj.Connect "" FaxReceiveObj.FaxNumber FaxReceiveObj.Name End Sub ~~~能幫助人的人最美
系統時間:2024-04-29 16:57:19
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!