Manage Learn to apply best practices and optimize your operations.

Using Unprocessed Docs

Whenever a new mail arrives in my mailbox, with its subject as "Business Contacts", I update the name of the sender in the members list, in the Group document named "Business" in the $Groups view of the Public Address Book.


' Initializing the objects
Dim s As New notessession
Dim pubdb As New notesdatabase("" , "") 'PAB
Dim dc As NotesDocumentCollection
Dim db As notesdatabase
Dim doc As notesdocument
Dim item As notesitem
Dim view As notesview

Set db = s.currentdatabase ' mail database serverName$ = db.Server

Set dc = db.UnprocessedDocuments
Call pubdb.open(servername$,"names.nsf")
For i = 1 To dc.Count
Set doc = dc.GetNthDocument( i )
subj=doc.getitemvalue("subject")
mfrom = doc.getitemvalue("from")

If subj(0) = "Business Contacts" Then

Set view=pubdb.getview("$Groups")
Set doc=view.getdocumentbykey("Business") 'Name of the Group
Set item =doc.getfirstitem("Members")
Call item.appendtotextlist(mfrom(0))
Call doc.save(True,False)
End If
Next
Call pubdb.Close

Dig Deeper on Lotus Notes Domino Administration Tools

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close