Command line fax app

Anyone know of an off-the-shelf app that will fax an existing file (on a drive) from a batch script or a command line (OS = Win XP)?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

There's no commandline app to send a fax, but you can create a VBScript to do this.

I've attached an example.

For reference follow this link:

Private Sub Form_Load()
        Dim objFaxDocument As New FAXCOMEXLib.FaxDocument
        Dim objFaxServer As New FAXCOMEXLib.FaxServer
        Dim objSender As FAXCOMEXLib.FaxSender
        Dim JobID As Object

        'Error handling
        On Error GoTo Error_Handler

        'Connect to the fax server

        'Set the fax body
        objFaxDocument.Body = "c:\Docs\Body.txt"

        'Name the document
        objFaxDocument.DocumentName = "My First Fax"

        'Set the fax priority
        objFaxDocument.Priority = FAXCOMEXLib.FAX_PRIORITY_TYPE_ENUM.fptHIGH

        'Add the recipient with the fax number 12225550100
        objFaxDocument.Recipients.Add("12225550100", "Bud")

        'Choose to attach the fax to the fax receipt
        objFaxDocument.AttachFaxToReceipt = True

        'Set the cover page type and the path to the cover page
        objFaxDocument.CoverPageType = FAXCOMEXLib.FAX_COVERPAGE_TYPE_ENUM.fcptSERVER
        objFaxDocument.CoverPage = "generic"

        'Provide the cover page note
        objFaxDocument.Note = "Here is the info you requested"

        'Provide the address for the fax receipt
        objFaxDocument.ReceiptAddress = ""

        'Set the receipt type to email
        objFaxDocument.ReceiptType = FAXCOMEXLib.FAX_RECEIPT_TYPE_ENUM.frtMAIL

        'Specify that the fax is to be sent at a particular time
        objFaxDocument.ScheduleType = FAXCOMEXLib.FAX_SCHEDULE_TYPE_ENUM.fstSPECIFIC_TIME
        'CDate converts the time to the Date data type
        objFaxDocument.ScheduleTime = CDate("4:35:47 PM")

        objFaxDocument.Subject = "Today's fax"

        'Set the sender properties.
        objFaxDocument.Sender.Title = "Mr."
        objFaxDocument.Sender.Name = "Bob"
        objFaxDocument.Sender.City = "Cleveland Heights"
        objFaxDocument.Sender.State = "Ohio"
        objFaxDocument.Sender.Company = "Microsoft"
        objFaxDocument.Sender.Country = "USA"
        objFaxDocument.Sender.Email = ""
        objFaxDocument.Sender.FaxNumber = "12165555554"
        objFaxDocument.Sender.HomePhone = "12165555555"
        objFaxDocument.Sender.OfficeLocation = "Downtown"
        objFaxDocument.Sender.OfficePhone = "12165555553"
        objFaxDocument.Sender.StreetAddress = "123 Main Street"
        objFaxDocument.Sender.TSID = "Office fax machine"
        objFaxDocument.Sender.ZipCode = "44118"
        objFaxDocument.Sender.BillingCode = "23A54"
        objFaxDocument.Sender.Department = "Accts Payable"

        'Save sender information as default

        'Submit the document to the connected fax server
        'and get back the job ID.

        JobID = objFaxDocument.ConnectedSubmit(objFaxServer)

        MsgBox("The Job ID is :" & JobID(0))


        Exit Sub

        '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

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
easybAuthor Commented:
Thanks for looking this up for me.  I can spend some time developing this but my skills are in jscript and C++.    Do you happen to know offhand any references to jscript for this?  I couldn't find much about it on MSDN?  Thanks again.
easybAuthor Commented:
Nanocosm -
I found at least 3 commercial fax apps with APIs that one can integrate with his
own script or compiled app to get command line functionality:

1)  Network Superfax 8.0 + API    at
2)  32bit/64bit Internet Fax           at  
3)  GFIFAXmaker                        at            

Attached is a stand-alone jscript file I made from the MSDN VBScript example you offered.  
I removed references to the FAXCOMEXLib, which is not shipped with WinXP.

It sends a fax nicely using the Windows XP Fax server..
It accepts 3 command line arguments for recipient name, recipient fax number,
and fax document.    Any number can be added.

Thanks   - easyb

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.