Nice way to run LotusScript agent on selected doc?

Hie everyone,

For the moment when I want to run a LotusScript agent on selected document, I am using this trick:

  • Run an @Formula agent with:

@Environment( variable ; value )

@Command( [ToolsRunMacro] ; LotusScriptAgent )

NB. LotusScript agent code:

valueV = notesSession.GetEnvironmentValue( name$ [, system ] )

OR

value$ = notesSession.GetEnvironmentString( name$ [, system ] )

Isn’t there a nicest way to retrieve values on each selected documents directly within the LotusScript agent ?

TIA for any feedback !

Subject: Nice way to run LotusScript agent on selected doc ?

The UnprocessedDocuments property of the NotesDatabase class gets a NotesDocumentCollection of all selected documents.

Agent-Trigger must be et to RunOnce.

Cheers, Michael

Subject: RE: Nice way to run LotusScript agent on selected doc ?

Thanks !!! it works like a charm !

NB. It work as expected with trigger “On Event”, “Agent list selection” and target “All selected documents”