'Set parameters for time estimate functionality
Dim TimeEstCounter As Long
TimeEstCounter = 1
Dim CurrentEstimate As String
CurrentEstimate = "Calculating time estimate, please wait..."
'Set interval to 5% of the total doc count
Dim TimeEstInterval As Integer
TimeEstInterval = Round(collect.count * 0.05 , 0)
Set TimeVar1 = New NotesDateTime( Now )
Do
Call sdoc.CopyToDatabase(tdb)
Set sdoc = collect.GetNextDocument(sdoc)
newcount = newcount + 1
If TimeEstCounter = TimeEstInterval Then
CurrentEstimate = TimeEstimate (collect.count, newcount, TimeVar1, TimeEstInterval)
'Reset values for next comparison
TimeEstCounter = 0
Set TimeVar1 = New NotesDateTime( Now )
End If
TimeEstCounter = TimeEstCounter + 1
Print newcount & " of " & collect.count & " docs " & typetitleaction & " from " &_
SourceTitle & " to " & TargetTitle & " (" & CurrentEstimate & ") - " & ErrorCount & " Errors"
Loop Until sdoc Is Nothing