Are Lotus Notes messages defined by any document class like in Exchange we have IPM.Note,IPM.Appointment,IPM.Note,IPM.Task and so many more ?
Software/Hardware used:
Lotus Notes 6.5
ASKED:
September 9, 2009 1:45 PM
UPDATED:
September 14, 2009 2:01 PM
The IPM objects sound like objects specific to elements in the Exchange envrionment. We have similar objects in Notes/Domino – but they are a bit different.
Now assuming I understand correctly (I’m not an exchange guy either – but a programmer), IPM.Note is probably a Note object, and IPM.Appointment is probably an object for an appointment on a calendar.
I believe an IPM.Note would correspond to a Message in a Notes/Domino Mail database. Thus, you would get documents with form item of “Memo”. One way to get a document like that is shown below. It is a very generic, and not efficient way, to do it. There are many other ways. No matter though, the doc object, once instantiated by the SET argument in the for loop is similar to an IPM.NOTE object.
Dim session as New NotesSession
Dim db as NotesDatabase
Dim dc as NotesDocumentCollection
Dim doc as NotesDocument
Dim searchform as string
set db = session.currentdatabase ‘(assuming in your mail file)
searchform = {Form = “Memo”}
Set dc = db.search(searchform, Nothing, 0)
If dc.count = 0 then
exit sub
end if
for d = 1 to dc.count
set doc = dc.getnthdocument(d)
next
The IPM.Appointment is a bit different. All calendar items (meeting, appointments, reminders, etc) use the same form but are differenitated by the “AppointmentType” field on the document. So you get documents based on 2 criteria here, the FORM (Appointment) and the AppointmentType (it is a string of numbers, i.e. “0″ is an Appointment and “3″ is a meeting). So similar code to above might be to get appointments (again there are more efficient ways to do this):
Dim session as New NotesSession
Dim db as NotesDatabase
Dim dc as NotesDocumentCollection
Dim doc as NotesDocument
Dim searchform as string
set db = session.currentdatabase ‘(assuming in your mail file)
searchform = {Form = “Appointment” & AppointmentType = “0″}
Set dc = db.search(searchform, Nothing, 0)
If dc.count = 0 then
exit sub
end if
for d = 1 to dc.count
set doc = dc.getnthdocument(d)
next
Again, the instantiated doc object is equivialent to a IPM.Appointment.
Hope this helps.
SilkTool: You are kind to offer some explanation.
Priti: Here is a link to IBM information about the LotusScript language, which allows you to script to the database/document model.
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.help.domino.designer85.doc/DOC/H_DUMMY_TOPIC_HEAD.html
link