Sub Initialize Dim nS As New NotesSession Dim nDC As NotesDocumentCollection Set nDC = nS.currentDatabase.UnprocessedDocuments If nDC.Count <= 0 Then Print "No documents selected." Exit Sub End If Dim nD As NotesDocument Set nD = nDC.getFirstDocument While Not nD Is Nothing Call nD.replaceItemValue("CFGDOCUNID",nD.UniversalId) Call nD.save(True, False, True) Set nD = nDC.getNextDocument(nD) Wend End Sub