Is it possible to check document(s) as unread?

any idea would be appreciated,

thank you.

Subject: is it possible to check document(s) as unread?

YES, it can be done, in fact I am doing it. You could use the C-API for this.

Subject: RE: is it possible to check document(s) as unread?

Remember, also, that the save method of the NotesDocument class has a parameter for marking the saved document read/unread:

flag = notesDocument.Save( force, createResponse [, markRead ] )

That may be helpful, depending on the specifics of what you are trying to do.

Subject: RE: is it possible to check document(s) as unread?

sorry for it, but can u share it ? if not - no problem, i will do it bymyself…

Subject: RE: is it possible to check document(s) as unread?

I thought you might ask this, but yesterday I did not had enough time to do so. Here is some code that will give you a table of ID’s of the unread documents for the current user. You can get a table for any user that has accessed the database. Just pass a different username.

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

Dim session As New NotesSession

Dim db As NotesDatabase

Dim tserver As String

Dim tdatabase As String

Dim username As String

Dim hDB As Long

Dim dbp As String*256

Dim dbpath As String

Dim userlist As Long



Set db = session.CurrentDatabase

username = session.UserName

tserver = db.Server

tdatabase = db.FilePath

status = OSPathNetConstruct(Null, tserver, tdatabase, dbp)

dbpath = Trim$(dbp)

status = NSFDbOpen(dbpath, hdb)

status = NSFDbGetUnreadNoteTable(hDB, username, Len(username), True, userlist)

’ now you have a list of ID’s that are unread for

IDDestroyTable(userlist)

status = NSFDbClose(hDB)

Subject: RE: is it possible to check document(s) as unread?

Hi,

can you please post the code from qwhich we can find wheter one particular mail has been read by the end user or not.

Our requirement is, our legal team has sent 4000 mails without return receipt and now they want to track how many have actually read the mail and with whom it is pending.

thanks for your help

regards,

Amit

Subject: is it possible tocheck document(s) as unread?

Do you mean like Edit > Unread mask > Mark Select Unread (or Mark All Unread)

Subject: RE: is it possible tocheck document(s) as unread?

it is correct, but i meant about programatically