次のエージェントは Subject アイテムの IsProtected プロパティを切り替えます。
Sub Initialize
Dim session As New NotesSession
Dim doc As NotesDocument
Dim item As NotesItem
Set doc = session.DocumentContext
Set item = doc.GetFirstItem("Subject")
If item.IsSigned Then
Print "Subject is protected ... unprotecting"
item.IsProtected = False
Else
Print "Subject is not protected ... protecting"
item.IsProtected = True
End If
Call doc.Save(True, True, True)
End Sub