Macro to Email report in Notes does everything but attch file

Laura Ford

New Member
Joined
Oct 17, 2012
Messages
7
I stole the following off of another post. I've added just a bit more, but I need to get it to attach a file that I would like to spell out in the call statement if at all possible. I cannot find the correct wording. :confused:

Thanks!
Laura


Call SendEMail(Array("Laura.Ford@fotlinc.com", "laura.ford@fruit.com"), "Laura.Ford@fotlinc.com", "Open POs", "BODY OF EMAIL BLAH")




Sub SendEMail(Recipient As Variant, CC As Variant, Subject As String, Body As String)
Dim notesSession As Object, notesDatabase As Object, notesDocument As Object
Set notesSession = CreateObject("Notes.NotesSession")
Set notesDatabase = notesSession.GETDATABASE("", "")
If notesDatabase.IsOpen = False Then notesDatabase.OPENMAIL
Set notesDocument = notesDatabase.CreateDocument
With notesDocument
.Form = "Memo"
.SendTo = Recipient
.CopyTo = CC
.Subject = Subject
.Body = Body
.SaveMessageOnSend = True
End With
With notesDocument
.PostedDate = Now()
.Send 0, Recipient
End With
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Forum statistics

Threads
1,215,537
Messages
6,125,386
Members
449,221
Latest member
DFCarter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top