Hi I have an macro which sends emails it is working fine.
But attachments are not working, can anyone pls help me in this.

columnA:Subject
columnB:Body format of the mail
columnC:attachmentpath
columnD:Attachment file name




Sub sending_lo_mail()


Dim Maildb As Object 'The mail database
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'The current users notes mail database name
Dim MailDoc As Object 'The mail document itself
Dim Session As Object 'The notes session
Dim Subject As String 'The subject string
Dim ReturnReceipt As String 'The ReturnReceipt string
Dim Recipient As String 'The Recipient string (or you could use the list)
Dim Recip(10) As Variant 'The Recipient list
Dim BodyText As String 'The body text
Dim Attachmentpath As String 'The Attachment
Dim SaveIt As Boolean 'Save to sent mail
Dim WasOpen As Integer 'Checking to see if the Mail DB was already
Const EMBED_ATTACHMENT As Long = 1454

''Subject = "Test Auto-generate"

Recip(10) = Array("[email protected]", "[email protected]")

SaveIt = True
Set Session = CreateObject("Notes.NotesSession")
UserName = Session.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = Session.GETDATABASE("", MailDbName)
If Maildb.IsOpen = True Then
WasOpen = 1 'Already open for mail
Else
WasOpen = 0
Maildb.OPENMAIL 'This will prompt you for password
End If
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = ""
MailDoc.sendto = Recip(10)
MailDoc.Subject = ThisWorkbook.Sheets("Sheet1").Range("A2").Value
MailDoc.Body = ThisWorkbook.Sheets("Sheet1").Range("B2").Value
MailDoc.Attachmentpath = ThisWorkbook.Sheets("Sheet1").Range("C2").Value

MailDoc.ReturnReceipt = "1"

MailDoc.SAVEMESSAGEONSEND = SaveIt
MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items folder
MailDoc.Send 0, Recipient

Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set EmbedObj = Nothing
If WasOpen = 1 Then
Set Session = Nothing
ElseIf WasOpen = 0 Then
Set Session = Nothing
End If

Dim Msg, Style, Title
Msg = "E-mail has been sent to " & Recipient & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Press OK to continue."
Style = vbOKOnly + vbInformation
Title = "Open Issues List"
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
End Sub