Show unread marked Lotus Notes email messages using LotusScript
Use this LotusScript and Formula language code to determine the read status of another user's Lotus Notes email messages.
With this LotusScript code, you can allow authorized users or administrators to identify the read status of another user's email messages. This is helpful in a situation, for example, where a secretary needs to know what email the boss has or hasn't seen. Please note the additional steps and code underneath this LotusScript code.
Lotusscript library called "UnreadMarks": Declarations ------------ Const NOTE_CLASS_VIEW = 8 Const TYPE_TEXT = (5 * 256) Const READ_BY_OWNER = "1" Const UNREAD_BY_OWNER = "0" Const READ_ITEM_NAME = "ReadByOwner" Const INBOX = "($Inbox)" Type DataRef type As Integer data As String*2 End Type Declare Function NIFFindDesignNote Lib "nnotes.dll" (Byval hdb As Long, Byval noteName As String, Byval wFlags As Integer , NoteId As Long) As Integer Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDb As Long) As Integer Declare Function NSFDbGetUnreadNoteTable Lib "nnotes.dll" (Byval hDb As Long, Byval UserName As String, Byval NameLength As Integer, Byval Create As Integer, hUnreadTable As Long) As Integer Declare Function NSFDbOpen Lib "nnotes.dll" (Byval dbName As String, hDb As Long) As Integer Declare Function NSFDbSetUnreadNoteTable Lib "nnotes.dll" (Byval hDb As Long, Byval UserName As String, Byval NameLength As Integer, Byval Flush As Integer, Byval hOriginalTable As Integer, Byval hUnreadTable As Long) As Integer Declare Function NSFDbStampNotes Lib "nnotes.dll" (Byval hdb As Long, Byval htab As Long, Byval itemname As String, Byval itemlen As Integer, data As DataRef, Byval datalen As Integer) As Integer Declare Function NSFDbUpdateUnread Lib "nnotes.dll" (Byval hDb As Long, Byval hTable As Long) As Integer Declare Function NSFFolderGetIDTable Lib "nnotes.dll" (Byval hviewDB As Long, Byval hdataDB As Long, Byval viewid As Integer, Byval flags As Long, htable As Long) As Integer Declare Function IDDestroyTable Lib "nnotes.dll" (Byval hTable As Long) As Integer Declare Function IDEntries Lib "nnotes.dll" (Byval hTable As Long) As Long Declare Function IDTableCopy Lib "nnotes.dll" (Byval hOriginalTable As Long, hNewCopy As Long) As Integer Declare Function OSLoadString Lib "nnotes.dll" (Byval hMod As Long, Byval strCode As Integer, Byval strBuf As String, Byval bufLen As Integer) As Integer Declare Function OSPathNetConstruct Lib "nnotes.dll" (Byval portname As String, Byval servername As String, Byval filename As String, Byval pathname As String) As Integer Dim status As Integer Sub GetOwnerStatus Dim ws As New NotesUIWorkspace Dim session As New NotesSession
![]() |
||||
|
![]() |
|||
![]() |
In your Lotus Notes inbox, add an icon column (3rd from the left) with this Formula language code:
@If(ReadByOwner="1"; 56; 0) and this hide-when formula: @GetProfileField("CalendarProfile"; "Owner")=@UserName
Then add an action (with the same hide-when formula) called "Get owner status" with this statement:
Call GetOwnerStatus
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip library by member Rob Goudvis. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.