Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending faxes with WinFax 9.0
Message
From
11/11/1999 08:16:42
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Sending faxes with WinFax 9.0
Miscellaneous
Thread ID:
00290020
Message ID:
00290020
Views:
83
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
Map
View

Click here to load this message in the networking platform