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. 
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

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