Domino 9 und frühere Versionen > Entwicklung

Querydocumentdelete

<< < (2/3) > >>

diali:
Du könntest noch ein
--- Code: ---dim ws as new NotesUIWorkSpace
ws.ViewRefresh
--- Ende Code ---
daranhängen.

pl001:
Danke, nur leider fragt er nach dem Schliessen der DB jetzt nocheinmal noch, ob die Dokumente gelöscht werden sollen, obwohl sie ja bereits gelöscht wurden.

Gruß
Peter

diali:
dann bleibt nur eine Schlaife über alle Dokumente und ein "Call doc.Remove(True)" . Allerdings musst Du diese Zeile bei Notes 6.x dann durch "Call doc.RemovePermanently(True)" ersetzen.

pl001:
Hmm, wie schon gesagt, kenne ich mich mit LS nicht aus.
Über ein Beispielscript wäre ich sehr dankbar.


Gruß
Peter

diali:

--- Code: ---antwort = Msgbox("Sollen wirklich alle markierten Dokumente gelöscht werden?", 292, "Frage")
If antwort <> 6 Then
   continue = False
   Exit Sub
End If

Dim dc As Notesdocumentcollection
Set dc = Source.Documents
dim doc as NotesDocument
dim doc_temp as NotesDocument
set doc = dc.getFirstDocument

while Not doc is Nothing
  set doc_temp = dc.GetNextDocument(doc)
  Call doc.Remove(True)
  set doc = doc_temp
wend
--- Ende Code ---
ist aber langsamer als dc.RemoveAll(True)

Navigation

[0] Themen-Index

[#] Nächste Seite

[*] Vorherige Sete

Zur normalen Ansicht wechseln