Hi All,

I am working in a project where I need to do the following:

1.-connect to the lotus notes
2.- Search an email by sender, subject and date
3.-Open the email and get the body
4.-Print the body in a word.doc

I have this code to connect to lotus note:

Set objSession = CreateObject("Lotus.NotesSession")
Call objSession.Initialize("password")

set Maildb = objSession.GetDatabase("servername", "mail.nsf")
If Not Maildb.IsOpen = True Then
Call Maildb.Open
End If
Set objInbox = Maildb.GetView("($inbox)")
With objInbox
x = 0
ReDim LmailID(x)
ReDim HasAttach(x)
Set doc = .GetLastDocument

but this code is not sufficient to complete my steps.

any body have a code for do that?