General information
Category:
Third party products
>>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?
>
>What is the error?
The error an "OLE error, the server threw an exception". Not a helpful error.
The problem seems to be with re-issuing these commands the second time and on;
***
oWinFax.AddRecipient() &&BOMBS RIGHT HERE WITH ERROR on second pass.
oWinFax.SetPrintFromApp(1) &&BOMBS RIGHT HERE WITH ERROR on second pass.
oWinFax.AddAttachmentFile("") &&BOMBS RIGHT HERE WITH ERROR on second pass.
oWinFax.Send(1) &&BOMBS RIGHT HERE WITH ERROR on second pass.
***
If I set these commands above the loop and not in the loop, then the 1st fax is sent out fine, and there are no errors on the 2nd fax, however on the 2nd fax, I get the WinFax Send dialog asking for the person's name and phone, ect... Even though I set that info in the loop.
The only way I can get the loop to work is by releasing and creating the object in the loop for every pass. I'd rather not do it that way, but that does work.
Is there a RESET method in WInFax or somewhere that I could get more documentation on WinFax?
Previous
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