If anybody has used John Henns code, thread #
398524, to send faxes using WinFax, then the following lines of code may be of use, if not, then please disregard..............
I needed to be able to determine the exact status of each fax, in order to resend, reschedule, or to inform the original sender that the fax hasn't been sent.
Firstly, assuming you've seen Johns code, insert the following line immediately after the command oWFSend.LeaveRunning():
lcMessageID = oWFSend.GetEntryID(0)
This will return the unique reference ID for the fax you are in the process of sending. As I loop around a DBF to send my faxes in the first instance, I simply save this message ID in against the relevant record for the current fax.
At predetermined intervals, every 10 minutes or so, I perform the following line of code:
oWFLog = createobject('WinFax.SDKLog')
I then loop around my fax table, and for each relevant record, I use oWFLog.GetMessageStatus(lcMessageID) to return the exact status of each fax. Depending on the code returned, I can then resend, reschedule, etc., etc. (See page 7-4 of the WinFax App SDK manual for values of message status; 2=Unknown, 3=Complete, 4=Failed, 8=Sending).
Regards
Derek