這個範例是寫在代理程式上面去執行:
'-----------------------------------------------------------------------
Declarations
Dim nuiw As notesuiworkspace
Dim nuidb As notesuidatabase
Dim ndb As notesdatabase
Dim ndoccol As notesdocumentcollection
Dim ndoc As notesdocument
Dim nuidoc As notesuidocument
Initialize
Sub Initialize
Set nuiw = New notesuiworkspace
Set nuidb = nuiw.currentdatabase
Set ndb = nuidb.database
Set ndoccol = ndb.unprocesseddocuments 'this collects the flagged documents
For j = 1 To ndoccol.count
Set ndoc = ndoccol.getnthdocument(j)
Set nuidoc = nuiw.editdocument(True,ndoc)
Call nuidoc.refresh
Call nuidoc.save
Call nuidoc.close
Next
End Sub
'----------------------------------------------------------------------------------------------------
沒有留言:
張貼留言