大家帮我看看这个代理有什么问题?
症状:用Notes调试时,发现doc没有item!? 为什么?当然运行此代理的表单域都全
Sub Initialize
Dim session As New NotesSession
Dim doc As NotesDocument
Set doc = session.DocumentContext
'发到待办事宜
Dim thisdb,dbsydb As NotesDatabase
Set thisdb=session.currentdatabase
Set dbsydb=session.getdatabase(thisdb.server,"oa\\dbsy.nsf")
Dim readername As notesname
tt=Evaluate("@name([cn];@username)")
myname=tt(0)
Forall i In doc.MeetMan
Set dbsydoc=dbsydb.CreateDocument
Set readername=New notesname(i)
dbsydoc.Form="dbsy"
dbsydoc.lx="被委托事宜"
dbsydoc.From=myname
dbsydoc.to=readername.common
dbsydoc.subject=myname+"发给你一件委托事宜"
dbsydoc.rq=Now
Dim readersItem As New NotesItem(dbsydoc,"reader",readername.Canonical,READERS)
Dim rtitem1 As Variant
Set rtitem1 = New NotesRichTextItem(dbsyDoc, "Body" )
Call rtitem1.AppendDocLink(doc,"请双击图标打开返回的文件" )
Call dbsyDoc.save(True,True,True)
End Forall
Call doc.save(True,True)
End Sub