Das Notes Forum

Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: Toma Bogdan am 13.02.03 - 12:42:33

Titel: how to mark a doc read/unread from mail db ?
Beitrag von: Toma Bogdan am 13.02.03 - 12:42:33
in the inbox I see a new doc with red colour .. I need to modify specific docs form mail db with Lotus Script (also I can modify this status with Insert key or from Edit menu) - how can I make this ? 10x
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: doliman am 17.02.03 - 21:30:57
Hi,

give me some more information. I don't understand excatly what you mean.
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: Toma Bogdan am 18.02.03 - 09:00:25
I try to copy through a picklist a doc from maildatabase Inbox to another db - db3 and I want the new doc marked with red from Inbox to be unmark after the doc was copied

Code
Dim ws As New notesuiworkspace
Dim col As notesdocumentcollection

Dim db As New NotesDatabase( "", "" )
Call db.OpenMail
Dim db3 As New NotesDatabase("","")
Set db3=ws.currentdatabase.database

Set col = ws.PickListCollection( 1 ,False, db.server, db.filepath, "($Inbox)", "Inbox folder "," Select the doc !")


Dim session As New NotesSession
Dim doc As NotesDocument
Dim newdoc As NotesDocument
Dim userName As New NotesName(session.UserName)
Set doc = col.GetFirstDocument
Set newdoc= doc.Copytodatabase(db3)

Call newdoc.Save( True, False )

if I use the code:

Code
eval$={@Command([ToolsMarkSelectedUnread]) } 
result=Evaluate(eval$) 
it will works ?
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: ata am 18.02.03 - 09:13:58
... I think @Commands will not work in Evaluate(...)

ata
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: doliman am 19.02.03 - 17:57:24
Hi,

how ata said the @command doesn't work at Lotus Script.
But try this:
make a agent with your formular an call the agent from the Lotus script.

Dim session As New NotesSession
Dim db As NotesDatabase
Dim theAgent As NotesAgent
Dim agentString As String
Set db = session.CurrentDatabase
Set theAgent = db.GetAgent("your agent")
If Not(theAgent Is Nothing) Then
     Call theAgent.Run
Else

Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: Toma Bogdan am 20.02.03 - 08:43:49
but what I want to do is to mark the docs from mail database that was read .... how can I make this ?
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: Rob Green am 20.02.03 - 09:13:11
Toma, the Notes Help is quiet good...its worth a look  ;) ;)

Saves any changes you have made to a document.
Defined in
NotesDocument
Syntax
flag = notesDocument.Save( force, createResponse [ , markRead ])
Parameters
force
Boolean. If True, the document is saved even if someone else edits and saves the document while the script is running. The last version of the document that was saved wins; the earlier version is discarded.
If False, and someone else edits the document while the script is running, the createResponse argument determines what happens.
createResponse
Boolean. If True, the current document becomes a response to the original document (this is what the replicator does when there's a replication conflict). If False, the save is canceled. If the force parameter is True, the createResponse parameter has no effect.
markRead
Boolean. If True, the document is marked as read. If False (default), the document is not marked as read.
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: Toma Bogdan am 20.02.03 - 09:45:18
so I need to enter in edit mode to save it, isn't it ?
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: Rob Green am 20.02.03 - 09:59:42
nay, the method .save derives from the NotesDocument class. Since its a backend class you can do all manipulations in backend without frontend editing.

Hey, Toma btw: dont you live in a sunny area of USA? You know what, send me a warm breeze to good ol´& cold Germany. Its time for spring.  :'(
Titel: Re:how to mark a doc read/unread from mail db ?
Beitrag von: Toma Bogdan am 20.02.03 - 10:09:21
yeap Rob .... it is time for spring but here last night starts (again) to snow...  btw I want to live in USA doesn't matter the region   8)

10x & regards