Lotus Notes FAQ Visit Our Sponsor!

How do you pass parameters to OpenAgent?

This code will create variables for each parameter you pass to ?OpenAgent. Values for each variable will also be set:

' From Kevin Pauli (kcpauli@usa.net), Technical Directions
Dim session As New NotesSession
Set doc=session.DocumentContext
Dim data List As String
args=doc.Query_String(0)
a = Instr(args, "&" )
Do While a>0
  args = Mid(args, a+1)
  a=Instr(args,"=")
  If a>0 Then varname = Left(args,a-1) Else Exit Do
  args=Mid(args, a+1)
  a=Instr(args,"&")
  If a>0 Then value = Left(args, a-1) Else value=args
  data(varname)=value
Loop

Applies to Notes Versions: 4 4.5 4.6 5
Last Modified: September 8, 1999