Forum Replies Created
-
AuthorPosts
-
December 4, 2001 at 12:14 am in reply to: Creating a new SEND object after MakeAttachment (semi-long) – WinFax crashes on creating second SEND object in Access 2000 #4334ER SlanskyMember
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 IfSet 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, acViewNormalSet 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.GetRecipientCountint_Return_Code = objWFXAttachment.AddAttachment
‘Now these values are really strange numbers, like 26000 and 372
int_Attachment_Count = objWFXSend.GetAttachmentCount
int_Recipient_Count = objWFXSend.GetRecipientCountThis 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
ER SlanskyMemberYes – 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??
-
AuthorPosts