ToolsRunMacro LotusScript

Hi,

May I know what is the lotus script syntax which is equivalent to the @Command([ToolsRunMacro]) command? Please advise.

Thanks

Kenny

Subject: ToolsRunMacro LotusScript

You can use this to run a agent.

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase

Dim agent As NotesAgent

Set db = s.CurrentDatabase

Set agent = db.GetAgent(“Agent to be run LotusScript”)

If agent.Run = 0 Then

Messagebox "Agent ran",, "Success"

Else

Messagebox "Agent did not run",, "Failure"

End If

End Sub

Subject: RE: ToolsRunMacro LotusScript

Hi,

But when running this script, the following error pops up:

“Unsupported trigger and search in the background or embedded agent”.

What is meant by the above?

Thanks

Kenny

Subject: RE: ToolsRunMacro LotusScript

It means that the agent is set to run on “selected documents” and you are running it in a context where there are no selected documents (e.g. in a server agent).

Subject: RE: ToolsRunMacro LotusScript

Such as a WebQuerySave() in my case - thanx!