Solved

Sample code to send winfax from access

Posted on 2006-10-30
2
302 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

776 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