Attachment Not Attaching In Lotus Notes

  • Hi All


    I have a problem getting an attachment (variable Site_Path) to attach to an email sent out in lotus notes. I found the below code while searching this forum but when I use it the email sends correctly except for the fact that the excel file i'm sending isnt attached. I have tried debugging and Site_Path contains the path to the file and the filename itself which I assume is correct. So I guess either I have copied the code incorrectly or the Variable Site_Path is incorrect?


    Is anybody able to help? Here is the code.





    Thanks in advance for your help!!


    James

  • Re: Attachment Not Attaching In Lotus Notes


    Your DIM statement of the 'Site_Path' variable is commented out, also, where are you defining the variable? When you F8 through your code you can mouse hover overtop of the variable and see what it equals.

  • Re: Attachment Not Attaching In Lotus Notes


    Hi,


    Site_Path seems correct.... It is defined further up in the code (it's quite long code) I have added a msgbox in the code to display Site_Path at the point the attachment should happen and it shows the correct files path and name(eg "c:\Test\Filename") although it doesnt have the ".xls" on the end. Is this important?


    I did however notice that I had Written the below code but had used Attachment in some parts which I have now, as shown below, changed to Attachment1. It didnt seem to solve the problem though.


    Code
    Attachment1 = Site_Path
                    If Attachment1 <> "" Then
                        Set attachME = MailDoc.CreateRichTextItem("Attachment1")
                        Set EmbedObj1 = attachME.EmbedObject(1454, "", Attachment1, "Attachment1")
                        MailDoc.CreateRichTextItem ("Attachment1")
                    End If


    Other than that I am still stuck as to what the problem is.


    Thanks


    James

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!