Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending Multiple Faxes with MS Access

5 views
Skip to first unread message

smdo...@gmail.com

unread,
Aug 17, 2006, 8:03:44 PM8/17/06
to
I am trying to fax a batch of word documents, containing work orders,
to techs on a daily basis.
The tech names are stored in a table, along with their associated FAX
number.

I have MS Access VBA that looks something like this...

==================================================================

'Initialize WinFax Pro for faxing.
ChanNum = DDEInitiate("FAXMNG32", "CONTROL")
DDEExecute ChanNum, "GoIdle"
DDETerminate ChanNum

'Fax work orders one at a time.
For I = 1 To I

MyTechFaxName = DLookup("[TechName]", "tblTechInformation",
"[TechFaxDocument]='" & MyFileNameArray(I) & "'")
MyTechFaxNumber = Left(MyFileNameArray(I), 13)
MyTechFaxAttachment = "C:\TechSender\Outbox\" & MyFileNameArray(I)

Call SendFax(MyTechFaxName, MyTechFaxNumber, MyTechFaxAttachment)

Next I

ChanNum = DDEInitiate("FAXMNG32", "CONTROL")
DDEExecute ChanNum, "GoActive"
DDETerminate ChanNum

==================================================================

Now, my function SendFax looks like this...

==================================================================

Function SendFax(MyRecip As String, MyFAXNumber As String, MyAttachment
As String)

Dim ChanNum
Dim IsReady As Integer
Dim lRet As Long
Dim MyFAXMsg As Integer
Dim objFax As Object
Dim objLog As Object
Dim strEntryID As String

Set objFax = CreateObject("WinFax.SDKSend")
Set objLog = CreateObject("WinFax.SDKLog")

lRet = objFax.SetHold(0)
lRet = objFax.SetSubject("Daily Work Order Fax") 'Set FAX
subject
lRet = objFax.SetNumber(MyFAXNumber) 'Set FAX phone
number
lRet = objFax.SetTo(MyRecip) 'Set FAX
recipient
lRet = objFax.SetCompany("Kimberlite Corporation") 'Set FAX
company name
lRet = objFax.AddAttachmentFile(MyAttachment)
lRet = objFax.ShowSendScreen(0) '1=Show, 0=Hide
lRet = objFax.ShowCallProgress(1) '1=Show, 0=Hide
lRet = objFax.AddRecipient
lRet = objFax.Send(1) '1=Return
EventID, 0=No EventID
Do While objFax.IsReadyToPrint() = 0
DoEvents
Loop

lRet = objFax.Done
lRet = objFax.LeaveRunning

Set objFax = Nothing

End Function

I have WinFax Automation Server referenced in my Tools-->References.

My problem is, when the code cycles through the table of tech names and
tries to send each tech their fax, it leaves a Send dialog window open,
even though I tell it, with code, not to display.

I am using WinFax Pro version 10.03...

0 new messages