views:

18

answers:

2

Does anyone know of a way to mark the current email as read using an @command?

A: 

I don't believe there is an @Command for marking documents read. There is a script method - NotesDocument.MarkRead(). Of course, you could run a script agent (using @Command[ToolsRunMacro]), and have the script agent get the current document and mark it read.

...
dim s as new notesSession, doc as notesDocument
set doc = db.documentContext
call doc.MarkRead()
...
Ed Schembor
A: 

If by "current document" you mean a the selected document in a view, you can use

ToolsMarkSelectedRead @Command

In a view or folder, marks all of the selected documents as read.

Syntax

@Command( [ToolsMarkSelectedRead] )

Usage

  • A database must be open at the view level or
  • A document must be open in Read or Edit mode Note In some databases, there is no difference in the display of read and unread documents in views and folders.

This command does not work on the Web.

Also, unless it's a new method in R8, NotesDocument.MarkRead is not an existing method. The only way you could do this would be to call NotesDocument.Save, and pass in true for the markRead parameter:

flag = notesDocument.Save( force, createResponse [, markRead ] ) 
EmmyS
`NotesDocument.MarkRead` **is** a valid method, introduced in version 8. It takes a single parameter, a username (as a string). If no username is passed-in then the code marks the document read on behalf of the current user ID.
Ben Poole