Sub Vanessa()
Dim UserName As String
Dim MailDbName As String
Dim Recipient As Variant
'Dim Attachment1 As String
Dim Maildb As Object
Dim MailDoc As Object
Dim AttachME As Object
Dim Session As Object
'Dim EmbedObj1 As Object
Dim stSignature As String
With Application
.ScreenUpdating = False
.DisplayAlerts = False
' Open and locate current LOTUS NOTES User
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
Else
Maildb.OPENMAIL
End If
' Create New Mail and Address Title Handlers
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
stSignature = Maildb.GetProfileDocument("CalendarProfile").GetItemValue("Signature")(0)
' Select range of e-mail addresses
Recipient = Array("Recipient.One@AOL.com", "Recipient.Two@AOL.com", "Recipient.Three@AOL.com", "Recipient.Four@AOL.com", "Recipient.Five@AOL.com")
MailDoc.SendTo = Recipient
MailDoc.Subject = "PLACE YOUR SUBJECT HERE"
MailDoc.Body = "PLACE THE MESSAGE YOU WANT TO SEND HERE" & vbCrLf & vbCrLf & stSignature
' Select Workbook to Attach to E-Mail
MailDoc.SaveMessageOnSend = True
'Attachment1 = "D:\Common\data\......xls" '"C:\YourFile.xls" ' Required File Name
'If Attachment1 <> "" Then
On Error Resume Next
Set AttachME = MailDoc.CREATERICHTEXTITEM("attachment1")
'Set EmbedObj1 = AttachME.embedobject(1454, "attachment1", "D:\Common\data\......xls", "") 'Required File Name
On Error Resume Next
End If
MailDoc.PostedDate = Now()
On Error GoTo errorhandler1
MailDoc.SEND 0, Recipient
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj1 = Nothing
.ScreenUpdating = True
.DisplayAlerts = True
End With
errorhandler1:
Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj1 = Nothing
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range
Set rng = Target.Parent.Range("A88")
If Target.Count > 1 Then Exit Sub
If Intersect(Target, rng) Is Nothing Then Exit Sub
Call Vanessa
End Sub