We help IT Professionals succeed at work.
Get Started

Send a Mail Item Using Access through Lotus Notes

alcapps asked
Last Modified: 2013-12-18
I need to send a Mail Message through Lotus Notes from MS. Access 97. I have found a Lotus Automation but have not figured out how to send it through yet.. Not connecting to the Database and server.. for starters..
here is some code I testing..
Public Sub Test()
Dim s As Object
Dim db As Object
Dim doc As Object
Dim rtitem As Object
Dim nt As Object

' start up Lotus Notes and get object handle

Set s = CreateObject("Notes.NotesSession")

Set db = s.GETDATABASE(server,database)


doc.Form = "Memo"
doc.SendTo = "mailaddress.."    'Enter the mail address here
doc.Subject = "This is a test message"        'Enter your subject matter here

' this will build the text part of your mail message

Set rtitem = doc.CREATERICHTEXTITEM("Body")
Call rtitem.APPENDTEXT("The body of the message goes here!")
Call rtitem.ADDNEWLINE(1)

Call doc.Send(False) 'Make sure this parameter stays false

' set all object handles to nothing to release memory

Set doc = Nothing
Set db = Nothing
Set s = Nothing
End Sub
Watch Question
This problem has been solved!
Unlock 1 Answer and 9 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE