Return Receipt sending workbooks with Lotus Notes

Incentives

New Member
Joined
Dec 12, 2005
Messages
5
I used one of the suggested scripts from the forum, but need to modify to include a Return Receipt. Anyone know how?

Sub SendEmailScript()
Dim Maildb As Object
Dim UserName As String
Dim MailDbName As String
Dim MailDoc As Object
Dim AttachME As Object
Dim Session As Object
Dim EmbedObj As Object
Dim RecipientRange As Range
Dim ccRecipientRange As Range
Dim bccRecipientRange As Range
Dim SubjectRange As Range
Dim BodyTextRange As Range
Dim AttachmentRange As Range

'Sends email with attachment based on information in row 2 of EMAIL LIST
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
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
Set RecipientRange = Worksheets("EMAIL LIST").Range("B2")
Recipient = RecipientRange
MailDoc.sendto = Recipient
Set ccRecipientRange = Worksheets("EMAIL LIST").Range("C2")
ccRecipient = ccRecipientRange
MailDoc.CopyTo = ccRecipient
Set bccRecipientRange = Worksheets("EMAIL LIST").Range("D2")
bccRecipient = bccRecipientRange
MailDoc.BlindCopyTo = bccRecipient
Set SubjectRange = Worksheets("EMAIL LIST").Range("E2")
Subject = SubjectRange
MailDoc.Subject = Subject
Set BodyTextRange = Worksheets("EMAIL LIST").Range("F2")
BodyText = BodyTextRange
MailDoc.Body = BodyText
Set AttachmentRange = Worksheets("EMAIL LIST").Range("G2")
MailDoc.SAVEMESSAGEONSEND = True
Attachment = AttachmentRange
Set AttachME = MailDoc.CREATERICHTEXTITEM("Attachment")
Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", Attachment, "Attachment")
'MailDoc.CREATERICHTEXTITEM ("Attachment")
MailDoc.PostedDate = Now()
MailDoc.SEND 0, Recipient

Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set Session = Nothing
Set EmbedObj = Nothing
Set RecipientRange = Nothing
Set ccRecipientRange = Nothing
Set bccRecipientRange = Nothing
Set SubjectRange = Nothing
Set BodyTextRange = Nothing
Set AttachmentRange = Nothing

End Sub
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,059
Office Version
  1. 365
Platform
  1. Windows
I would suggest you look at the LotusScript help file.

It should list the properties of the mail item object, and I assume there will be one related to read receipts.

I'm afraid I can really help further as I don't currently have access to Notes.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,530
Messages
5,572,660
Members
412,481
Latest member
nhantam
Top