Fax Software

Community Forums

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • ER Slansky
    Member

    No – when I am ready to actually create and send the fax to the recipient, if I do not set the SEND object to nothing and attempt to recreate it, I get an Automation Error every time I try to execute the AddRecipient and the AddAttachment methods of the SEND object. I’m guessing that I am somehow not getting a good reference to the Attachment object, so when I execute the Attachment.Addattachment method, I am overwriting the recipient and attachment info portion of the SEND object.

    I really just need to figure out what methods of the SEND object I have to invoke in order to “print” a series of reports and simply add them to the Attachments database. There may be times that I will need to add 20-50 reports. At the end of the day, the faxes will be created to send the reports to the appropriate recipients (i.e. reports 1, 6, and 20 may go to recipient A, who gets 2 copies of every report; reports 2,3, and 30 may go to recipient B who gets one copy of every report, etc. – does this make sense what I want to accomplish?) Right now, I’m just trying to get it to work for ONE report to ONE recipient and I can’t even do that.

    I’m trying to do the printing and adding of the report this way:

    If objWFXSend Is Nothing Then
    Set objWFXSend = New CSDKSend
    objWFXSend.SetClientID ( “test_client” )
    objWFXSend.LeaveRunning
    End If

    Set objWFXAttachment = CreateObject( “WinFax.Attachment” )
    Set objWFXAttachments = CreateObject(“WinFax.Attachments”)

    objWFXSend.ShowSendScreen (0)

    ‘ Before I did this, the send dialog would appear.
    objWFXSend.SetPreviewFax (0)

    objWFXSend.SetPrintFromApp (1)

    ‘ I don’t know if I need to do this or not – it doesn’t work ‘ whether I do or not, I just get different errors.
    ‘ objWFXSend.Send (0)

    objWFXSend.MakeAttachment txtSpecID, “G:PathFaxData”, 0
    DoCmd.OpenReport strDocName, acViewNormal

    Set objWFXAttachment = objWFXAttachments.NewAttachment
    str_File_Name = “G:PathFaxData” & file_name & “.fxs”

    objWFXAttachment.SetMultipage (0)
    objWFXAttachment.SetDescription (str_Description)
    objWFXAttachment.SetFileName (str_File_Name)

    ‘ Here, these values are zero:
    int_Attachment_Count = objWFXSend.GetAttachmentCount
    int_Recipient_Count = objWFXSend.GetRecipientCount

    int_Return_Code = objWFXAttachment.AddAttachment

    ‘Now these values are really strange numbers, like 26000 and 372
    int_Attachment_Count = objWFXSend.GetAttachmentCount
    int_Recipient_Count = objWFXSend.GetRecipientCount

    This is just one of different variations I have tried. Sometimes I’ve tried just using the Attachment object without setting it to a NewAttachment, but nothing change.

    If there is anyone experienced with this or sees an obvious error, please respone. I really don’t know if I need to exececute the Send(0) before or after the .MakeAttachment method, or even at all. The .MakeAttachment and .Addattachment DO work – the reports DO end up in the WinFax attachment database.

    Thanks,

    ER Slansky

    in reply to: SDK Log Object – Cannot Create Log Object #4220
    ER Slansky
    Member

    Yes – tried everything to get it to run and just gave up. Then started having problems with the Attachment object which I already HAD working before. Attachment object simply disappeared from the Register. Finally had to unload entire Winfax app then do a fresh load. Don’t know what happened, but the Attachment object is back and the Log object now shows IDISPATCH interface and SDK Log example works. Thanks anyway. Any ideas why the object registrations would get so messed up??

Viewing 2 posts - 1 through 2 (of 2 total)