Naja, ich vergleiche in meinem Script immer einenen Eintrag der View mit der nächsten.
Sub Doppelt(View As NotesView)
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim vec As NotesViewEntryCollection
Dim ve, oldVe As NotesViewEntry
Dim newDoc As NotesDocument
Dim oldDoc As NotesDocument
Set db = s.CurrentDatabase
Set vec= view.AllEntries
'Ersten Eintrag im View holen
Set ve = vec.GetFirstEntry()
While Not ve Is Nothing
'Wert der ersten Spalte holen
oldValue = ve.ColumnValues(0)
oldValue1 = ve.ColumnValues(1)
oldValue2 = ve.ColumnValues(2)
oldValue3 = ve.ColumnValues(3)
oldValue4 = ve.ColumnValues(4)
oldValue5 = ve.ColumnValues(5)
oldValue6 = ve.ColumnValues(6)
oldValue7 = ve.ColumnValues(7)
oldValue8 = ve.ColumnValues(
'Nächsten eintrag im View holen
Set ve = vec.GetNextEntry(ve)
'Wenn es einen nächsten Eintrag gibt
If Not ve Is Nothing Then
newValue = ve.ColumnValues(0)
newValue1 = ve.ColumnValues(1)
newValue2 = ve.ColumnValues(2)
newValue3 = ve.ColumnValues(3)
newValue4 = ve.ColumnValues(4)
newValue5 = ve.ColumnValues(5)
newValue6 = ve.ColumnValues(6)
newValue7 = ve.ColumnValues(7)
newValue8 = ve.ColumnValues(
If newValue = oldValue And newValue1 = oldValue1 And newValue2 = oldValue2 And newValue3 = oldValue3 And newValue4 = oldValue4 And newValue5 = oldValue5 And newValue6 = oldValue6 And newValue7 = oldValue7 Then
Set oldDoc = vec.GetPrevEntry(ve).Document
Set newDoc = ve.Document
Dim tmpDoc As New NotesDocument(db)
Dim item As New NotesItem(tmpDoc,"DUIDS","")
Call item.AppendToTextList(oldDoc.UniversalID)
Call item.AppendToTextList(newDoc.UniversalID)
flag = ws.DialogBox("dialoge_compareTwoDocs_doppelt_besser",True,True,False,False,False,False,"doppelte Daten",tmpDoc,True,False,True)
If flag Then
If Isempty(tmpDoc.Vorname) Then newDoc.Vorname=tmpDoc.Vorname Else newDoc.Vorname=tmpDoc.Vorname_1
If Isempty(tmpDoc.f1) Then newDoc.Strasse=tmpDoc.f1 Else newDoc.Strasse=tmpDoc.f1_1
If Isempty(tmpDoc.PLZ) Then newDoc.PLZ=tmpDoc.PLZ Else newDoc.PLZ=tmpDoc.PLZ_1
If Isempty(tmpDoc.Ort) Then newDoc.Ort=tmpDoc.Ort Else newDoc.Ort=tmpDoc.Ort_1
If Isempty(tmpDoc.Telefon) Then newDoc.Telefon=tmpDoc.Telefon Else newDoc.Telefon=tmpDoc.Telefon_1
If Isempty(tmpDoc.Handy) Then newDoc.Handy=tmpDoc.Handy Else newDoc.Handy=tmpDoc.Handy_1
If Isempty(tmpDoc.WWW) Then newDoc.WWW=tmpDoc.WWW Else newDoc.WWW=tmpDoc.WWW_1
If Isempty(tmpDoc.Geburtstag) Then newDoc.Geburtstag=tmpDoc.Geburtstag Else newDoc.Geburtstag=tmpDoc.Geburtstag_1
Call newDoc.Save(True,True)
Call oldDoc.Remove(True)
End If
End If
End If
Wend
Call ws.ViewRefresh
End Sub
Falls das hilft. Ansonsten sorry.