Sub Initialize
Dim session As New notessession
Dim db As notesdatabase
Dim doc As notesdocument
Dim view As notesview
Dim item As notesItem
Set db=session.currentdatabase
Set view=db.getView("viewPublished")
Set doc=view.getFirstDocument
While Not doc Is Nothing
If doc.IsTop(0)="1" Then
doc.IsTop(0)="0"
End If
Set doc=view.getNextDocument(doc)
Wend
End Sub
我这样写老报错
------解决方案--------------------
If doc.IsTop(0)="1" Then
doc.IsTop(0)="0"
End If
改为
If doc.IsTop(0)="1" Then
doc.IsTop="0"
End If
------解决方案--------------------
我也犯过这个错误,哈哈。
再加个Call doc.save(True,False).