以下 sub 似乎有效,它从 7.0.3 客户端可以生成的任何设计元素中删除了标志。我NotesNoteCollection
从Ian关于同一主题的博客文章中获得了线索:
Private Sub clearDesignInheritance(db As notesdatabase)
On Error Goto errorthrower
Dim nc As NotesNoteCollection
Set nc = db.CreateNoteCollection(True) ' Select all note types...
nc.SelectDocuments=False ' ...except data documents.
Call nc.BuildCollection
Dim noteid As String
noteid = nc.GetFirstNoteId
Dim doc As notesdocument
Do Until noteid=""
Set doc = db.GetDocumentByID(noteid)
If doc.HasItem("$Class") Then
Call doc.RemoveItem("$Class")
Call doc.save(False,False,False)
End If
noteid = nc.GetNextNoteId(noteid)
Loop
Exit Sub
ErrorThrower:
Error Err, Error & Chr(13) + "Module: " & Cstr( Getthreadinfo(1) ) & ", Line: " & Cstr( Erl )
End Sub