![]() ![]() ' Copyright : The following may be altered and reused as you wish so long as the ' References : requires 'Microsoft Fax Service Extended COM Type Library' ' Purpose : Send Broadcast fax (send fax to multiple recipients) MsgBox "Error number: " & Err.Number & ", " & Err.Description "question and then try again.", vbInformation, "Your Fax cannot be " & _ MsgBox "You currently have the document to be faxed open and are therefore" & _ This 'implementation is for demonstration purposes If Err.Number = -2147024864 Then 'Implement error handling at the end of your subroutine. 'The count and item numbering will change as you remove the items, so 'just remove item (1) Count times Dim lCount As Long 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. 'UBound finds the size of the array 'Display jobIDs for each of the fax jobs 'For n = 0 To UBound(JobId) ' MsgBox "The Job ID is " & JobId(n) 'Next 'Remove the recipients from the collection. ObjFaxDocument.GroupBroadcastReceipts = True 'Connect to the fax server, submit the document, and get back the 'job ID array. MsgBox strMsg, vbInformation, "The following faxes are being processed." 'Load the default sender ", " & collFaxRecipients.Item(i).FaxNumber & vbCrLf StrMsg = strMsg & "Recipient number " & i & ": " & collFaxRecipients.Item(i).Name & _ 'Display recipient information Dim i As Long For i = 1 To collFaxRecipients.Count StrMsg = "Total Number of Recipients: " & collFaxRecipients.Count & vbCrLf ![]() MsgBox "There are no faxes to be sent at this time!", vbInformationĮnd If End With 'Display number of recipients Rst.MoveLast 'goto the last recordset Do Until rst.BOF 'beginning of file 'perform a desired action If rst.RecordCount > 0 Then 'ensure there is data Set rst = CurrentDb.OpenRecordset( "Temp01") ![]() 'Using the table created by the above run query loop through the record 'To populate the fax recipient list Dim rst As DAO.Recordset 'Update the table from which the info is pull to generate the fax recipient listĭoCmd.SetWarnings False 'Turn off warning messages so it is transparent to the userĭoCmd.OpenQuery "Qry_Need To Be Faxed", acViewNormalĭoCmd.SetWarnings True 'Turn back on warning messages 'Add the recipients With collFaxRecipients ObjFaxDocument.DocumentName = "Database Fax" 'Get the recipients collection Set collFaxRecipients = objFaxDocument.Recipients ' ' Input Variables: ' ~~~~~~~~~~~~~~~~ ' strDoc - path and filname of the document to be faxed '- ' Function SendBroadCast(strDoc As String)ĭim objFaxDocument As New FAXCOMEXLib.FaxDocumentĭim JobId As Variant Dim strMsg As String 'Error handling On Error GoTo Error_Handler It may not be sold/resold or reposted on other sites (links ' back to this site are allowed). ' Website : ' Code Source: ' Purpose : Send Broadcast fax (send fax to multiple recipients) ' References : requires 'Microsoft Fax Service Extended COM Type Library' ' Copyright : The following may be altered and reused as you wish so long as the ' copyright notice is left unchanged (including Author, Website and ' Copyright). '- ' Procedure : SendBroadCast ' Author : CARDA Consultants Inc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |