by
Torrie Moore >> Mon, 31 Mar 2008 19:57:57 GMT
You can use the Microsoft Fax Service ActiveX interface to send a fax. Import this library and then the example script should get you going. More information on this can be found on the Microsoft web site.
Regards
Torrie
====== EXAMPLE ======
vars
oFaxDocument : FaxDocument;
oFaxServer : FaxServer;
saJobID : StringArray;
oIFaxServer : IFaxServer;begin
create oFaxDocument transient;
create oFaxServer transient;
oFaxServer.createAutomationObject();
oFaxDocument.createAutomationObject();
oFaxServer.connect( "Server Name");
//Set the fax body
oFaxDocument.body := "C:\temp\Test.txt";
//Name the document
oFaxDocument.documentName := "My First Fax";
//Set the fax priority
oFaxDocument.priority := 1;
//Add the recipient with the fax number
oFaxDocument.recipients.add( "Receiptient Phone", "Receiptient Name" );
//Choose to attach the fax to the fax receipt
oFaxDocument.attachFaxToReceipt := true;
//Set the cover page type and the path to the cover page
oFaxDocument.coverPageType := Microsoft_Fax_Service_Extend.FcptSERVER; // Server
oFaxDocument.coverPage := "generic";
//Provide the cover page note
oFaxDocument.note := "Testing a fax";
//Provide the address for the fax receipt ie where the fax reciept is sent. //objFaxDocument.ReceiptAddress = "
someone@example.com"
//Set the receipt type to email
oFaxDocument.receiptType := Microsoft_Fax_Service_Extend.FrtNONE;
//Specify that the fax is to be sent at a particular time
oFaxDocument.scheduleType := Microsoft_Fax_Service_Extend.FstNOW; // now //CDate converts the time to the Date data type
oFaxDocument.subject := "Today's fax 2";
//Submit the document to the connected fax server
//and get back the job ID.
oFaxDocument.connectedSubmit( oFaxServer.getInterface( IFaxServer).IFaxServer );