VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Fax Access Reports

by urbano da gama (3 Submissions)
Category: Microsoft Office Apps/VBA
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (9 Votes)

Use this code to fax enable your application. Use this code to fax your access report. It also explains how to use winfax. I hope you find this code useful and spend a moment to rate it.

Assumes
You will need to have symantec Winfax Pro10.0 installed on your machine before executing this code.

Rate Fax Access Reports

Public Function FaxReport() As Boolean
  On Error GoTo EH
  Dim lReport As Report
  Dim lFileName As String
  Dim lSendObj As Object' winfax send object
  Dim lRet As Long
  
  'delete any existing fax report file
  lFileName = CurDir & "\" & "FaxReport.html"
  If Dir(lFileName) <> vbNullString Then
    Kill lFileName
  End If
  'save as an html file so that it can be faxed 
  'as an attachement
  DoCmd.OutputTo acOutputReport, _
      mReportName, "html", lFileName
  
  'now is the time to fax the html file
  Set lSendObj = CreateObject("WinFax.SDKSend")
  lRet = lSendObj.SetAreaCode("801")
  lRet = lSendObj.SetCountryCode("1")
  lRet = lSendObj.SetNumber(9816661)
  lRet = lSendObj.AddRecipient()
  lRet = lSendObj.AddAttachmentFile(lFileName)
  lRet = lSendObj.ShowCallProgress(1)
  lRet = lSendObj.Send(0)
  lRet = lSendObj.Done()
  
  Exit Function
EH:
  Exit Function
end function

Download this snippet    Add to My Saved Code

Fax Access Reports Comments

No comments have been posted about Fax Access Reports. Why not be the first to post a comment about Fax Access Reports.

Post your comment

Subject:
Message:
0/1000 characters