2008年3月13日 星期四

05.請問如何更新前景文件欄位值(背景的欄位值較新)

這個範例是寫在代理程式上面去執行:
'-----------------------------------------------------------------------
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
'----------------------------------------------------------------------------------------------------

沒有留言: