Can someone help me with why this code isn't attaching the file attachment? (1 Viewer)

bb29829

Registered User.
Local time
Today, 11:07
Joined
Dec 4, 2014
Messages
17
The email is sending fine but no attachment. Can anyone help?

Private Sub Command219_Click()
Dim objAttachment As Object
Dim objMailDb As Object
Dim objMailDocument As Object
Dim objEmbedObject As Object
Dim objNotesSession As Object
Dim strMailDbName As String
On Error Resume Next
Set objNotesSession = CreateObject("Notes.NotesSession")
Set objMailDb = objNotesSession.GETDATABASE("", strMailDbName)
objMailDb.OPENMAIL
Set objMailDocument = objMailDb.CREATEDOCUMENT
objMailDocument.Form = "Memo"
objMailDocument.sendto = "ADDRESS"
objMailDocument.Subject = "TEST"
objMailDocument.Body = "TEST TEST TEST"
objMailDocument.SAVEMESSAGEONSEND = fSaveMailToTheSentFolder
If strFileAttachment <> "" Then
Set objAttachment = MailDoc.CREATERICHTEXTITEM("I:\My Offers\Pending Test.xls")
Set objEmbedObject = objAttachment.EmbedObject(1454, "", strFileAttachment, "I:\My Offers\Pending Test.xls")
End If
objMailDocument.SEND 0, strLotusNotesUserID
'Clean Up
Set objMailDb = Nothing
Set objMailDocument = Nothing
Set objAttachment = Nothing
Set objNotesSession = Nothing
Set objEmbedObject = Nothing
End Sub
 

Users who are viewing this thread

Top Bottom