Domino 9 und frühere Versionen > ND6: Entwicklung
markiertes Dokument ansprechen
Nexus:
Also, ich bin davon ausgegangen, ich habe euch alle Info´s gegeben . Hab auch eigentlich den ganzen Code euch gepostet. Habe alle Abänderungen ausprobiert. Aber er löscht mir immer noch das erste Dokument in der Ansicht, aus dem ich durch auswahl der Dokumente meine Collection fülle.
Was braucht ihr also alles. Die Datenbank kann ich euch leider nicht schicken,wegen Betriebsgeheimnissen etc. kennt ja diese Klausel bla bla ...
Der Code steht zu 99% ( Variabel Deklaration lass ich halt weg ) im Forum. Soll ich nochmal den aktuellen Stand des Codes posten ?
zhermann:
Hallo Nexus,
poste bitte den gesamten Code inklusive der Variablen Dekleration.
Manchmal versteckt sich ja auch da ein Fehler, der sich auf den Ablauf des Codes auswirkt.
Gruß
Zsolt
Nexus:
Sub Initialize
Dim session As New NotesSession
Dim db1 As NotesDatabase
Dim db2 As NotesDatabase
Dim thisdb As NotesDatabase
Dim searchview1 As NotesView
Dim searchview2 As NotesView
Dim searchview3 As notesview
Dim vc As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim docDB1 As NotesDocument
Dim docdb2 As NotesDocument
Dim docEingabe As NotesDocument
Dim Copydoc As NotesDocument
Dim DB1GroupName As Variant
Dim db1GroupNameE As String
Dim FirstDocCheckDB1 As Boolean
Dim Db1EntryCount As Integer
Dim DB1EntryCounter As Integer
Dim db1VS As Variant
Dim db2vs As Variant
Dim Nam As NotesName
Dim StringConv As String
Dim StringConvE As String
Dim intStrLaenge As Integer
Dim intStrLaengeF As Integer
Dim strSearchMemory As String
Dim SearchMemoryA As Variant
Dim Nullstatus As Integer
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim collection As NotesDocumentCollection
Dim item As NotesItem
Dim nextdoc As NotesDocument
Dim deldoc As NotesDocument
'Set uidoc = workspace.CurrentDocument
Set thisdb = session.CurrentDatabase
Set searchview3=thisdb.GetView("vergleichsAusgabe")
Set db1 = session.GetDatabase( "", "c:\Dokumente und Einstellungen\Markus\Eigene Dateien\Notes\vergleich\VergleichDB1.nsf" )
Set db2 = session.GetDatabase( "", "c:\Dokumente und Einstellungen\Markus\Eigene Dateien\Notes\vergleich\VergleichDB2.nsf" )
Set searchview1=db1.GetView("Groups")
Set searchview2 =db2.GetView("Groups")
Set collection = thisdb.UnprocessedDocuments
Set copydoc = collection.GetFirstDocument()
While Not(copydoc Is Nothing)
Set nextdoc = collection.GetNextDocument(copydoc)
Call copydoc.RemoveItem("ERRdescription")
Call copydoc.Save (True, True)
Call copydoc.CopyToDatabase ( db1 )
Call copydoc.CopyToDatabase ( db2 )
Set deldoc = copydoc
Call deldoc.Remove(True)
Set copydoc = nextdoc
'
Wend
Messagebox "Replacement finished"
End Sub
Aufgrund der vielen Versuche, hab ich die restlichen Variablen mal drin gelassen. Die stören ja nicht.
Glombi:
Du hast den Code von mir nicht korrekt eingetragen:
Set collection = thisdb.UnprocessedDocuments
Set copydoc = collection.GetFirstDocument()
While Not(copydoc Is Nothing)
Set deldoc = copydoc
Set nextdoc = collection.GetNextDocument(copydoc)
Call copydoc.RemoveItem("ERRdescription")
Call copydoc.Save (True, True)
Call copydoc.CopyToDatabase ( db1 )
Call copydoc.CopyToDatabase ( db2 )
Call deldoc.Remove(True)
Set copydoc = nextdoc
'
Wend
Messagebox "Replacement finished"
End Sub
Probiere es bitte mal damit aus. Das copydoc geht über den Jordan wie gesagt. Daher muss delcodc gesetzt werden, BEVOR Du copydoc.CopyToDatabase aufrufst.
Andreas
Nexus:
Geht nicht, die ausgewählten Dokumente werden nicht gelöscht. Aber wieder einmal das erste.
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln