Faxing from Access?

  • Thread starter Thread starter Andrew J
  • Start date Start date
A

Andrew J

Does anyone know how to send access reports to a fax using
MS Fax, WinFax, etc. I have a database of recipients with
fax numbers. This is used to product a report that I want
to fax to each recipient.

Thanks in advance.
 
Hi:

Try this code. It works for me with WinFax (should be self explanatory) --

Public Function SendFaxToNum(faxNum As String, fileAttach As String, strName
As String, strCompany As String) As Boolean
Dim objSend As Object

SendFaxToNum = False

On Error GoTo Err_Handler
Set objSend = CreateObject("WinFax.SDKSend")
objSend.SetCompany (strCompany)
objSend.SetTo (strName)
objSend.SetSubject ("Invoice")
objSend.AddAttachmentFile (fileAttach)
objSend.SetNumber (faxNum)
objSend.AddRecipient
objSend.Send (0)
objSend.Done
Set objSend = Nothing

SendFaxToNum = True
Exit Function
Err_Handler:
DoCmd.Hourglass False
MsgBox Err.Description, vbInformation
End Function

Naresh Nichani
Microsoft Access MVP
 
Thanks Naresh, I'll give that a try.

-----Original Message-----
Hi:

Try this code. It works for me with WinFax (should be self explanatory) --

Public Function SendFaxToNum(faxNum As String, fileAttach As String, strName
As String, strCompany As String) As Boolean
Dim objSend As Object

SendFaxToNum = False

On Error GoTo Err_Handler
Set objSend = CreateObject("WinFax.SDKSend")
objSend.SetCompany (strCompany)
objSend.SetTo (strName)
objSend.SetSubject ("Invoice")
objSend.AddAttachmentFile (fileAttach)
objSend.SetNumber (faxNum)
objSend.AddRecipient
objSend.Send (0)
objSend.Done
Set objSend = Nothing

SendFaxToNum = True
Exit Function
Err_Handler:
DoCmd.Hourglass False
MsgBox Err.Description, vbInformation
End Function

Naresh Nichani
Microsoft Access MVP





.
 
Back
Top