Subject: RE: Help restoring a replicated database
You could write an agent that saved each selected doc in a view pretty easily. Something like (untested) …
Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim collection As NotesDocumentCollection
Set collection = db.UnprocessedDocuments
Dim isAdmin As Variant
isAdmin = Evaluate(|@IsMember(“[Administration]”; @UserRoles)|)
If isAdmin(0) = False Then
Messagebox "You do not have sufficient access to use this Action.", 64, "Access Restriction"
Exit Sub
End If
’ Wake up user.
answer% = Messagebox (“Do you really want to save all the selected documents?” + Chr(13) + “This will update the last modified date.”, 4+32+256, “Document Processing”)
If answer% = 7 Then
Exit Sub
End If
If collection.Count = 0 Then
answer% = Messagebox ("You must have at least one document seleted to use this action.", 0+48+0, "Document Processing")
If answer% = 1 Then
Exit Sub
End If
End If
’ Set up document processing.
SuccessCounter% = 0
FailCounter% = 0
On Error Goto Errhandle
Dim doc As NotesDocument
For counter = 1 To collection.Count
Set doc = collection.GetNthDocument( counter )
If doc.Save( True, False ) Then
SuccessCounter% = SuccessCounter% + 1
Else
FailCounter% = FailCounter% + 1
End If
Print "Replace Values Progress: Item " + Cstr( counter ) + " of " + Cstr(collection.Count)
Next
’ Process complete.
Call workspace.ViewRefresh
Messagebox “Processed " + Cstr(SuccessCounter%) + " document(s) successfully.” + Chr(13) + Cstr(FailCounter%) + " document(s) failed.", 0+64+0, “Document Processing”
Exit Sub
Errhandle:
’ Use the Err function to return the error number and the Error$ function to return the error message.
FailCounter% = FailCounter% + 1
answer% = Messagebox (“Item " + Cstr(counter) + " failed. Error” & Str(Err) & ": " & Error$, 0+48+0, “Document Processing”)
If answer% = 1 Then
Exit Sub
End If
Resume Next
End Sub