C
c.kurutz
Access 2003, WinFax 10.04, Windows XP
I have the following code I pieced together from several posts I have
seen on a button on an Access form. I am sorry I can't credit the
developer(s). I am trying to print a filtered report to WinFax filling
in the cover page with data from an Access form. This works but not
together. I get one cover page with name, fax number and company
filled in and it starts to automatically send. I also get another
cover page (basic) with the filtered report attached. This one stays
on the screen (doesn't automatically send) and no information is filled
in (fax number, company, name). Both of these things are happening
when I click the button that runs this code.
PLEASE help. I have been going around and around with this code.
'***Start code****
Dim objWinfaxSend As New wfxctl32.CSDKSend
Dim RetCode As Long
'Set objWinfaxSend = CreateObject("WinFax.SDKSend8.0")
RetCode = objWinfaxSend.SetClientID(Me.Customer)
'Begin Recipient Settings
Application.Printer = Application.Printers("WinFax")
gstrReportFilter = "QuoteID = " & Me.QuoteID
DoCmd.OpenReport "RPT_QuoteDetailsTotalWF", , , gstrReportFilter
RetCode = objWinfaxSend.SetTo(Me.contactname)
RetCode = objWinfaxSend.SetNumber(Me.CustomerFax)
RetCode = objWinfaxSend.SetSubject("Quote")
RetCode = objWinfaxSend.SetCompany(Me.Customer) '
'Destination
RetCode = objWinfaxSend.SetDeleteAfterSend(0) ' Do Not Delete
RetCode = objWinfaxSend.SetQuickCover(1) ' Yes
'RetCode = objWinfaxSend.SetUseCover(1) ' Yes to Include a
cover
RetCode = objWinfaxSend.SetCoverText("Quoted by RIL")
'RetCode =
objWinfaxSend.SetCoverFile("C:\ProgramFiles\WinFax\Cover\Basic1.CVP")
RetCode = objWinfaxSend.AddRecipient
RetCode = objWinfaxSend.ShowCallProgess(1)
RetCode = objWinfaxSend.Send(1)
RetCode = objWinfaxSend.LeaveRunning ' This will leave Winfax
controller running.
Do While objWinfaxSend.IsReadyToPrint = 0
DoEvents
Loop
'****END CODE****
Any help is greatly appreciated.
I have the following code I pieced together from several posts I have
seen on a button on an Access form. I am sorry I can't credit the
developer(s). I am trying to print a filtered report to WinFax filling
in the cover page with data from an Access form. This works but not
together. I get one cover page with name, fax number and company
filled in and it starts to automatically send. I also get another
cover page (basic) with the filtered report attached. This one stays
on the screen (doesn't automatically send) and no information is filled
in (fax number, company, name). Both of these things are happening
when I click the button that runs this code.
PLEASE help. I have been going around and around with this code.
'***Start code****
Dim objWinfaxSend As New wfxctl32.CSDKSend
Dim RetCode As Long
'Set objWinfaxSend = CreateObject("WinFax.SDKSend8.0")
RetCode = objWinfaxSend.SetClientID(Me.Customer)
'Begin Recipient Settings
Application.Printer = Application.Printers("WinFax")
gstrReportFilter = "QuoteID = " & Me.QuoteID
DoCmd.OpenReport "RPT_QuoteDetailsTotalWF", , , gstrReportFilter
RetCode = objWinfaxSend.SetTo(Me.contactname)
RetCode = objWinfaxSend.SetNumber(Me.CustomerFax)
RetCode = objWinfaxSend.SetSubject("Quote")
RetCode = objWinfaxSend.SetCompany(Me.Customer) '
'Destination
RetCode = objWinfaxSend.SetDeleteAfterSend(0) ' Do Not Delete
RetCode = objWinfaxSend.SetQuickCover(1) ' Yes
'RetCode = objWinfaxSend.SetUseCover(1) ' Yes to Include a
cover
RetCode = objWinfaxSend.SetCoverText("Quoted by RIL")
'RetCode =
objWinfaxSend.SetCoverFile("C:\ProgramFiles\WinFax\Cover\Basic1.CVP")
RetCode = objWinfaxSend.AddRecipient
RetCode = objWinfaxSend.ShowCallProgess(1)
RetCode = objWinfaxSend.Send(1)
RetCode = objWinfaxSend.LeaveRunning ' This will leave Winfax
controller running.
Do While objWinfaxSend.IsReadyToPrint = 0
DoEvents
Loop
'****END CODE****
Any help is greatly appreciated.