Solved

Sample code to send winfax from access

Posted on 2006-10-30
2
284 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
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 500 total points
ID: 17840314
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now