Domino 9 und frühere Versionen > ND6: Entwicklung

Kopieren von docs über View

<< < (3/3)

Axel:
Eigentlich reicht es, wenn du nach der Schleife alle Dokumente der Collection löschst.

Sub Initialize
   Dim workspace As New NotesUIWorkspace
   Dim session As New NotesSession
   Dim db As NotesDatabase
   Dim dc As NotesDocumentCollection
   Dim doc As NotesDocument
   Dim newdoc As NotesDocument
   Dim zaehler As Integer
   Set db = session.CurrentDatabase
   Set dc = db.UnprocessedDocuments
   Set doc = dc.GetFirstDocument
   Set newdoc = New NotesDocument(db)

   zaehler = 1
   While Not (doc Is Nothing)
      
      newdoc.Form = "namemaske"
      newdoc.Feld1 = "Kopie"
      newdoc.Feld2 = doc.Feld2
      newdoc.Feld3 = doc.Feld3
      newdoc......
      newdoc.Feld20 = doc.Feld20

      If zaehler = 1 Then Print zaehler & "Dokument bearbeitet" Else Print zaehler & "Dokument bearbeitet"
      Call newdoc.ComputeWithForm(True,False)
      Call newdoc.Save(True, False)
      Set doc = dc.GetNextDocument(doc)
      zaehler = zaehler + 1
   Wend
  
  Call dc.Remove(True)

End Sub


Axel

iworks:
Hallo noch mal,

oh ok....,sorry habe die msg weiter oben übersehen. Wiedermal vielen dank, es tut alles. Super.

Gruß...

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln