- This topic is empty.
-
AuthorPosts
-
July 18, 2003 at 3:07 am #2488
gracelee
MemberI am writing a .NET program to send over 500 faxes per day automatically. The program works fine if only send 40 faxes but if over 100 faxes, it will hang when convert the first fax to fax image. I need to click the cancel button manually and then it continue to send the other 499 faxes.
And i found that everytime it convert the files(i use .rtf file which generated from oracle) to fax image, the MS word will open, is it possible to hide the MS word when converting the document?
Is there any problem in my code? i am using windows2000 with office 2000, winfaxPro 10.02 and VB .NET.
Here is my code, i have a for loop to call the SendFaxAtt functions.
Private Function SendFaxAtt(ByVal attPath As String, ByVal coverPath As String, ByVal faxNo As String, ByVal subject As String) As String
Dim sendObj As New wfxctl32.CSDKSend()
On Error GoTo Err
Dim RetCode As Integer
sendObj.SetCompany(“ABC”)
sendObj.SetTo(“”)
RetCode = sendObj.SetSubject(subject)
RetCode = sendObj.SetCoverText(” “)
RetCode = sendObj.SetCoverFile(coverPath)
RetCode = sendObj.SetUseCover(1)RetCode = sendObj.AddAttachmentFile(attPath)
RetCode = sendObj.SetNumber(faxNo)
RetCode = sendObj.AddRecipient()
RetCode = sendObj.SetDeleteAfterSend(1)
RetCode = sendObj.Send(0)
If RetCode <> 0 Then Stop
Do Until sendObj.IsReadyToPrint = 1
System.Windows.Forms.Application.DoEvents()
Loop
System.Windows.Forms.Application.DoEvents()
‘I can’t use IsEntryIDReady coz it will loop forever
‘Do While sendObj.IsEntryIDReady(0) <> 1
‘ System.Windows.Forms.Application.DoEvents()
‘Loop
sendObj.Done()sendObj = Nothing
Exit Function End Function
July 18, 2003 at 12:42 pm #4197Anonymous
Memberhave you tried
RetCode = sendObj.Send(1)
that way you can use the IsEntryIDReady loop?
July 21, 2003 at 4:33 am #4198gracelee
MemberIf change to
RetCode = sendObj.Send(1)
it can only send the first one, and then loop forever -
AuthorPosts
- You must be logged in to reply to this topic.