折腾了半天,搞了两个MODEM,终于。。。

下例仅以Jscript实现,其他版本参考可得。

自己记下来也希望对你有帮助^_^。

注意:

    此段代码仅对WinXp有效,Win 2000及Win 98发送方法各不相同;

参考:
    http://members.optusnet.com.au/~hssandler1/VBScript.htm
    http://www.dotnetjunkies.com/Forums/ShowPost.aspx?PostID=2932
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fax/faxlegacyvb_836n.asp

通过程序控制Windows传真发送。///////////////////////////////////////
通过程序控制Windows传真发送。//
    Title:    Fax send sample code
通过程序控制Windows传真发送。//
    Date:     2005-1-18
通过程序控制Windows传真发送。//
    Author:   runmin@tom.com
通过程序控制Windows传真发送。//
/////////////////////////////////////
通过程序控制Windows传真发送。

通过程序控制Windows传真发送。
//    Get the fax server
通过程序控制Windows传真发送。
var faxServer = new ActiveXObject("FAXCOMEX.FaxServer");
通过程序控制Windows传真发送。
通过程序控制Windows传真发送。faxServer.Connect(
"");
通过程序控制Windows传真发送。
通过程序控制Windows传真发送。
//    Create a fax document
通过程序控制Windows传真发送。
var doc = new ActiveXObject("FAXCOMEX.FaxDocument");
通过程序控制Windows传真发送。
通过程序控制Windows传真发送。
//    Specify a content file, any printable file.
通过程序控制Windows传真发送。
doc.Body = "C:\\Program Files\\Kingsoft\\Powerword 2003\\Tips.txt";
通过程序控制Windows传真发送。
通过程序控制Windows传真发送。doc.DocumentName 
= "Fax Test Sample";
通过程序控制Windows传真发送。
通过程序控制Windows传真发送。
//    Recipients
通过程序控制Windows传真发送。
doc.Recipients.Add("820")    //    to fax number here
通过程序控制Windows传真发送。

通过程序控制Windows传真发送。
//    Sender properties
通过程序控制Windows传真发送。
doc.Sender.Name = "mruan"
通过程序控制Windows传真发送。
通过程序控制Windows传真发送。doc.Sender.FaxNumber 
= "806"    //    from fax number here
通过程序控制Windows传真发送。

通过程序控制Windows传真发送。
//    Send the fax doc
通过程序控制Windows传真发送。
doc.ConnectedSubmit(faxServer)

相关文章:

  • 2022-12-23
  • 2021-07-16
  • 2022-01-03
  • 2021-06-18
  • 2022-02-10
  • 2022-01-03
  • 2021-08-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2021-04-19
  • 2022-02-04
相关资源
相似解决方案