Domino 9 und frühere Versionen > ND6: Entwicklung

Bestimmte Dokumente in Col per Script

<< < (2/2)

Wiesel:
Bernhard, ich wusste ich kann mich auf Dich verlassen  ;)

Genau das habe ich gesucht und es klappt wie am Schnürchen:

Sub Archivierung ()
   Dim S As New NotesSession
   Dim DB As NotesDatabase
   Dim Doc As NotesDocument
   Dim col As NotesDocumentCollection
   Dim strArchivDB As String
   Dim strArchivPfad As String
   
   Set DB = S.CurrentDatabase
   Set col = DB.UnprocessedDocuments
   Set Doc = DB.GetProfileDocument("(DBProfil)")
   'Profil Dokument auslesen
   strArchivDB = Doc.dbServerArchiv(0)
   strArchivPfad = Doc.dbDateiArchiv(0)
   Dim ArchivDB As New NotesDatabase(strArchivDB,strArchivPfad)
   
   Set Doc = col.GetFirstDocument()
   'Dokumente kopieren   
   Do Until Doc Is Nothing
      Call Doc.CopyToDatabase(ArchivDB)
      Set Doc = col.GetNextDocument(Doc)
   Loop
   'Dokumente löschen
   Call Col.RemoveAll(True)
End Sub


DANKE!

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln