Sub Initialize
On Error Goto erro
Dim s As New Notessession
Dim doccontext As NotesDocument
Set doccontext = s.DocumentContext
'ex: query_string = "Openagente&id=123456;789456"
'Pegando os ids da URL
str_id = Fulltrim(Split(retornaParametro(doccontext.query_string(0), "id"),";") )
Forall x In str_id
Msgbox "valor de x = " & x
Print|iframe src="./0/| + x + |?OpenDocument" frameborder=0 marginheight=5% marginwidth=% width=100% height=100%>iframe|
End Forall
SAI:
Exit Sub
erro:
Print "Erro no initialize do agente agt_imprimir na linha " & Erl & " Do tipo" & Error
Resume SAI
End Sub
Function retornaParametro ( qry As String, param As String ) As String
'Função para retornar o parâmetro da querystring
Dim i,j As Integer
Dim result As String
i = Instr(1, qry, param)
result= ""
If i > 0 Then
j = Instr(i, qry, "&")
If j > 0 Then
result$ = Mid(qry, i + Len(param) + 1, (j - 1) - (i + Len(param)))
Else
result$ = Mid(qry, i + Len(param) + 1)
End If
End If
retornaParametro = result
End Function
Nenhum comentário:
Postar um comentário