Forum Replies Created
-
AuthorPosts
-
lmeineckeMember
I did what you suggested two days ago and changed the tail end of the code section to include this:
objWinfax.AddRecipient()
objWinfax.Send(1)
Do While objWinfax.IsEntryIDReady(0) <> 1
Application.DoEvents()
Loop
objWinfax.Done()I also changed my If condition on the file processing to not break the jobs down into so many. The job ran considerably longer than it has in a while before the send screen popped up. With the handle issue in 10.04 and other memory leak issues we had with 10.01 on 2003, I’m wondering if WinFax Pro can’t handle the volumn of faxes I’m sending in one shot. I got through about 900 documents for about 100 destinations before the send screen popped up. Any thoughts on that possibility?
lmeineckeMemberHere is the code (the database query has been removed) that we are currently using. Basically, the batch vb.net exe program creates a group of .pdf files and then we process them out of the directory. We use the pdf file name to hold the data to search the database to get all of the fax info.
files = System.IO.Directory.GetFiles(“C:Fax”, “*pdf”)
Array.Sort(files)
For Each file_name In files
If System.IO.File.Exists(file_name) = True Then
strOrder = Mid(file_name, 48, 10)
strCIX = Mid(file_name, 33, 10)
strPlantNum2 = Mid(file_name, 44, 3)
If strPlantNum2 = “543” Then
strPlantCIX = strCIX & “-” & strPlantNum2 & “-” & strOrder
Else
strPlantCIX = strCIX & “-” & strPlantNum2
End If
If strPlantCIX <> str_prev_PlantCIX Then
str_prev_PlantCIX = strPlantCIX
strOX = “SELECT FROM DATABASE QUERY”
Try
rsOX = CONN2.Execute(strOX)
Catch ex As Exception
PrintLine(1, “[” & Now() & “] N:”, ex.Message, ex.StackTrace)
End Try
While Not rsOX.EOF
Dim objWinfax As New wfxctl32.CSDKSend
objWinfax.ShowSendScreen(0)
objWinfax.SetClientID(“CTR”)
Dim header_info()
objWinfax.ShowSendScreen(0)
objWinfax.SetSubject(“XXXXX”)
objWinfax.ShowSendScreen(0)
objWinfax.SetTo(rsOPEX.Fields(“CONTACT_NAME”).Value)
objWinfax.ShowSendScreen(0)
objWinfax.SetCompany(strCIX)
objWinfax.ShowSendScreen(0)
objWinfax.EnableBillingCodeKeyWords(1)
objWinfax.ShowSendScreen(0)
objWinfax.SetBillingCode(strPlantNum2)
objWinfax.ShowSendScreen(0)
objWinfax.SetNumber(“9,1” & rsOPEX.Fields(“FAX_NUMBER”).Value)
attach_num = 0
objWinfax.ShowSendScreen(0)
Dim Attach_Array() As String
Attach_Array = System.IO.Directory.GetFiles(“C:Fax”, “*” & strPlantCIX & “*pdf”)
ctr_s = 0
For Each Attachment In Attach_Array
objWinfax.ShowSendScreen(0)
attach_num = attach_num + 1
objWinfax.AddAttachmentFile(Attachment)
objWinfax.ShowSendScreen(0)
just_path = Mid(Attachment, 1, 32)
just_file = Mid(Attachment, 33, 70)
System.IO.File.Copy(Attachment, just_path & “Sent” & just_file, True)
PrintLine(1, “[” & Now() & “] Faxing: ” & Attachment)
ctr_s = ctr_s + 1
Next
objWinfax.ShowSendScreen(0)
objWinfax.AddRecipient()
objWinfax.ShowSendScreen(0)
objWinfax.Send(0)
objWinfax.ShowSendScreen(0)
objWinfax.Done()
objWinfax = Nothing
header_info = Nothing
rsOX.MoveNext()
End While
End If
GC.Collect()
End If
Next
End If -
AuthorPosts