- This topic is empty.
-
AuthorPosts
-
January 12, 2004 at 3:44 pm #2731
jmv
MemberI have been trying to get my program working with WinFax Pro 10.03 on Windows 2000. I have a VB 6.0 dll that contains a function that I am trying to get working. The function basically has to fax a file to a recipient without interaction from a user, and return a unique identifier. Here is my current code:
Public Function SendFax(vFilePath As String, vFaxNumber As String) As Long
On Error GoTo ErrHandler
  Dim objFaxSend As wfxctl32.CSDKSend
  Dim JobID As Long
  Set objFaxSend = New wfxctl32.CSDKSend
 Â
  With objFaxSend
    .SetCompany "My Company"
    .SetTo "Your Company"
    .SetSubject "The Subject"
    .AddAttachmentFile "c:387898.txt" 'vFilePath
    .SetNumber "9055555555" 'vFaxNumber
    .AddRecipient
    JobID = .Send(0)
    .Done
  End With
  Set objFaxSend = Nothing
 Â
  SendFax = JobID
   Â
  Exit Function
ErrHandler:
  Err.Raise Err.Number, "SendFax[" & Err.Source & "]", Err.Description
End Function
I just need it to send the file to the recipient. But it just returns a Zero, and a message comes up on the screen that says: “The selected attachment is being converted into a fax image.” That message says on the screen until I hit the Cancel button. I have been testing this with a txt document, but in production I will have to send html documents.
Any suggestions? Am I doing this totally wrong?
Thanks in advance…
January 16, 2004 at 8:23 pm #4674Anonymous
Memberyou might be terminating the SDK send object before WinFax has been given enough time to generate the image, therefore the “converting…” message is stuck there.
check out the download section for sample SDK code. The Word 2000 code may help.
-
AuthorPosts
- You must be logged in to reply to this topic.