?
Solved

Sample code to send winfax from access

Posted on 2006-10-30
2
Medium Priority
?
327 Views
Last Modified: 2008-02-01
I am looking for some sample code to be able to send reports out by using winfax.  Currently Winfax is the only program that we have to send faxes out.  I am looking for a way to automate it.  Currently we only use MSAccess for our database.
0
Comment
Question by:hpfam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Expert Comment

by:yhwhlivesinme
ID: 17836087
Taken from: http://www.experts-exchange.com/Databases/MS_Access/Q_21244188.html

Function TestFax()

Dim objWinFaxSend As Object
Dim strDate As String
Dim strTime As String
Dim strSetTo As String
Dim intCust As Integer
Dim intCounter As Long

intCust = 0

strSetTo = "My Customer Name"
strDate = Format(DATE , "mm/dd/yy")
strTime = Format(Now(), "hh:mm:ss")

Do While intCust < 3

Set objWinFaxSend = CreateObject("Winfax.SDKSend")
objWinFaxSend.SetSubject ("Test Fax")
objWinFaxSend.SetNumber ("1234567")
objWinFaxSend.SetAreaCode ("713")
objWinFaxSend.SetTo (strSetTo)
objWinFaxSend.SetDate (strDate)
objWinFaxSend.SetTime (strTime)
objWinFaxSend.SetCompany ("Commercial Chemical")
objWinFaxSend.AddRecipient
objWinFaxSend.SetPrintFromApp (1)
objWinFaxSend.Send (1)
objWinFaxSend.ShowSendScreen (0)

    Do While objWinFaxSend.IsReadyToPrint = 0
    DoEvents
    Loop

DoCmd.OpenReport "MyReport", acViewNormal

intCust = intCust + 1

objWinFaxSend.Done

    Do While objWinFaxSend.IsEntryIDReady(0) <> 1
    DoEvents
    Loop

Set objWinFaxSend = Nothing
DoEvents

Loop

End Function
0
 
LVL 46

Accepted Solution

by:
tbsgadi earned 2000 total points
ID: 17840314
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question