Try this (Make sure Faxing Service is turned on in the Control File)
You will know it is if you can see it in the printers list
You just may be in luck - I have discovered this code which looks like it may just do the job for you !
Code:Sending a Fax The following Microsoft Visual Basic code example sends a fax. Note that if you were to convert this Visual Basic example to Visual Basic Scripting Edition (VBScript), you would have to use an enumeration constant instead of the value fptHigh. For more information, see Using Enumerations in Scripts. Private Sub Form_Load() Dim objFaxDocument As New FAXCOMEXLib.FaxDocument Dim objFaxServer As New FAXCOMEXLib.FaxServer Dim objSender As FaxSender Dim JobID As Variant 'Error handling On Error GoTo Error_Handler 'Connect to the fax server objFaxServer.Connect "" 'Set the fax body objFaxDocument.Body = "c:\Docs\Body.txt" 'Name the document objFaxDocument.DocumentName = "My First Fax" 'Set the fax priority objFaxDocument.Priority = 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 = 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 = "[email protected]" 'Set the receipt type to email objFaxDocument.ReceiptType = frtMAIL 'Specify that the fax is to be sent at a particular time objFaxDocument.ScheduleType = 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 = "[email protected]" 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 objFaxDocument.Sender.SaveDefaultSender '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) objFaxServer.Disconnect 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
NOW HERE'S ANOTHER VARIATION FOR BROADCASTING FAXES TO A LIST
Code:Broadcasting a Fax The code for broadcasting a fax is similar to the code for sending a fax. This code example uses the Submit rather than the ConnectedSubmit method, and therefore does not create a FaxServer object. The FaxDocument object serves as the root object. Also, the code differs in the number of recipients and the number of job IDs returned. Private Sub Form_Load() Dim objFaxDocument As New FAXCOMEXLib.FaxDocument Dim collFaxRecipients As FaxRecipients Dim JobId As Variant 'Error handling On Error GoTo Error_Handler 'Set the fax body objFaxDocument.Body = "c:\Docs\Body.txt" 'Name the document objFaxDocument.DocumentName = "My First Fax" 'Get the recipients collection Set collFaxRecipients = objFaxDocument.Recipients 'Add the recipients With collFaxRecipients .Add "12225550105", "H" .Add "12225550104", "N" .Add "12225550103", "G" End With 'Display number of recipients MsgBox "Number of recipients: " & collFaxRecipients.Count 'Display recipient information Dim i As Long For i = 1 To collFaxRecipients.Count MsgBox "Recipient number " & i & ": " & collFaxRecipients.Item(i).Name & ", " & collFaxRecipients.Item(i).FaxNumber Next 'Load the default sender objFaxDocument.Sender.LoadDefaultSender 'Group the broadcast receipts objFaxDocument.GroupBroadcastReceipts = True 'Connect to the fax server, submit the document, and get back the 'job ID array. "" indicates the local server. JobId = objFaxDocument.Submit("") 'UBound finds the size of the array For n = 0 To UBound(JobId) MsgBox "The Job ID is " & JobId(n) Next 'Remove the recipients from the collection. If you don't take this step, 'and run this code again without closing the program, the recipients 'collection will retain the recipients and keep adding more recipients. 'The count and item numbering will change as you remove the items, so 'just remove item (1) Count times Dim lCount As Long lCount = collFaxRecipients.Count For i = 1 To lCount collFaxRecipients.Remove (1) Next 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




Reply With Quote