Lotus Notes

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I'd like to e-mail a report from a form using Lotus Notes.
I've always used Outlook and so it was easy - how do I
code to use with Notes?

I'm using Acc97 w/ Notes 5.0.6a

Thanks in advance,

Jason
 
Here's some code I found - looks like it works good - I
just need to figure out how to add the attachment (my
report)...

'Create some object variables for the various Notes objects
Dim NotesDB As Object
Dim NotesDoc As Object
Dim NotesRTF As Object
Dim NotesSession As Object


'Use Create object to instantiate a Notes session object
Set NotesSession = CreateObject("Notes.Notessession")

'Instantiate NotesDB object from method off NotesSession
Set NotesDB = NotesSession.getdatabase("", "")
NotesDB.openmail
'Create new Notes document
Set NotesDoc = NotesDB.createdocument
'Not quite sure how these function work, but seems to
suggest that they are replacing textual
'values in the Document object wiht corresponding E-
Mail Address and Subject strings
Call NotesDoc.replaceitemvalue("Sendto", "J@J")
Call NotesDoc.replaceitemvalue("Subject", "Test E-Mail")
'Something to do with creating the Body of the E-Mail
Set NotesRTF = NotesDoc.createrichtextitem("body")
'Send the e-mail
Call NotesDoc.Send(False)
'Destroy the Notes objects
Set NotesSession = Nothing
End Sub
 
Back
Top