General information
Category:
Third party products
Title:
Sending faxes with WinFax 9.0
We are using WinFax 9.0 and VFP 6.0. What we want to do is loop through a table and fax a VFP report to different fax numbers.
The first example sends 1 report to 1 fax number. This example works great.
The problem we have is when sending faxes in a loop. The first report is generated OK but we get an OLE error on the second pass and the program stops.
***Example 1. Sends 1 fax. Works great.
USE junk
oWinFax = CreateObject("WinFax.SDKSend")
oWinFax.SetSubject("Test subject")
oWinFax.SetNumber("555-5555")
oWinFax.SetAreaCode("555")
oWinFax.SetCompany("Fax One")
oWinFax.AddRecipient()
oWinFax.SetPrintFromApp(1)
oWinFax.AddAttachmentFile("")
oWinFax.Send(1)
SET PRINTER TO NAME winfax
REPORT FORM junk TO PRINT NOCONSOLE
SET PRINTER TO
RELEASE owinfax
***End of example 1.
***Example 2. Bombs on second pass.
USE junk
oWinFax = CreateObject("WinFax.SDKSend")
SCAN
oWinFax.SetSubject("Test subject")
oWinFax.SetNumber("555-5555") &&Get the next fax# from a table.
oWinFax.SetAreaCode("555")
oWinFax.SetCompany("Fax One") &&Get next company name from table.
oWinFax.AddRecipient() &&BOMBS RIGHT HERE WITH ERROR on second pass.
oWinFax.SetPrintFromApp(1)
oWinFax.AddAttachmentFile("")
oWinFax.Send(1)
SET PRINTER TO NAME winfax
REPORT FORM junk TO PRINT NOCONSOLE
ENDSCAN
SET PRINTER TO
RELEASE owinfax
Any ideas on why the program bombs on second pass?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only