首先创建一个代理名字为ab: 代码如下: sub initialize dim session as new notessession dim db as notesdatabase dim view as notesview dim doc as notesdocument set db=session.currentdatabase set view=db.getview( "fwd ") set doc=view.getfirstdocument if doc.hasitem( "bh ") then while not(doc is nothing) forall bh in doc.getitemvalue( "bh ") messagebox bh end forall set doc=view.getnextdocument(doc) wend end if end sub
改成这样: sub initialize dim session as new notessession dim db as notesdatabase dim view as notesview dim doc as notesdocument set db=session.currentdatabase set view=db.getview( "fwd ") set doc=view.getfirstdocument while not(doc is nothing) if doc.hasitem( "bh ") then forall v in doc.getitemvalue( "bh ") print ¦ <script language= 'javascript '> ¦ print ¦alert( " ¦+cstr(v)+ ¦ "); ¦ print ¦ </script> ¦ end forall end if set doc=view.getnextdocument(doc) wend end sub