Ein Frage....
Bei einem Archiv eines Kollegen fehlen Dokumente in der Inbox. Eigentlich kein Problem, da es bei IBM ein tolles Script gibt:
aber....
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim fDoc As NotesDocument ' Document in folder
Dim ad As notesview ' All Documents view
Dim aDoc As notesdocument ' document in All Docs view
Dim fUNID() As String ' array of UNID's of docs in folders
Dim i As Integer ' UNID array index
Dim deldate As notesitem
Dim Chair1 As notesitem
Dim startdate As String
Sub Initialize
Dim s As New notessession
Dim db As notesdatabase
Dim fDoc As NotesDocument ' Document in folder
Dim ad As notesview ' All Documents view
Dim aDoc As notesdocument ' document in All Docs view
Dim fUNID() As String ' array of UNID's of docs in folders
Dim i As Integer ' UNID array index
Dim deldate As notesitem
Dim Chair1 As notesitem
Dim startdate As Variant
Dim enddate As Variant
i =0
Set db = s.CurrentDatabase
Redim fUNID(0)
' Build UNID array by looping through folders, then their documents
startdate=(Inputbox("Startdatum eiingeben"))
enddate=(Inputbox("Endatum eingeben"))
Forall view In db.views
If view.IsFolder And Not view.Name=("($All)") Then
Set fDoc = view.GetFirstDocument
While Not fDoc Is Nothing
Redim Preserve fUNID(i)
fUNID(i) = fDoc.UniversalID
i=i+1
Set fDoc = view.GetNextDocument(fDoc)
Wend
End If
End Forall
' Loop through docs in the All Documents view and compare UNIDs to each doc in the array
Set ad = db.GetView("($All)")
Set aDoc = ad.GetFirstDocument
While Not aDoc Is Nothing
i = 0
Do While i <= Ubound(fUNID)
If fUNID(i) = aDoc.UniversalID Then
Exit Do
End If
i = i + 1
Loop
Set deldate = adoc.getfirstitem("delivereddate")
Set Chair1 = adoc.getfirstitem("CHAIR")
If i > Ubound(fUNID) And Not deldate Is Nothing And Chair1 Is Nothing Then
Call adoc.PutInFolder( "($Inbox)")
End If
Set aDoc = ad.GetNextDocument(adoc)
Wend
End Sub
..... die Datenbank ist zu groß und beinhaltet zuviele Dokumente und ich würde deswegen das Auswahldatum gerne eingrenzen.
Aus dem Grund würde ich gerne ein Start und ein Enddatum setzen.
Irgendwie fehlt mir aber noch die Idee, wie ich diese Werte jetzt in das Script mit verkaspern kann??
Ich hab mich durch einige Posts gelesen, wie auch die Hilfe, aber was jetzt da das richtige dafür ist, bin ich noch nicht ganz schlau draus geworden.
Notesdaterange mit start und enddate ??? Oder doch anders ...
Bräuchte mal einen Tipp von euch
Danke im voraus...
Hallo,
Koennte man nicht hiermit eventuell doch das gewollte erreichen?
siehe hierzu NotesViewEntryCollection
Set vecol = vw.AllEntries
Call vecol.FTSearch(...)
Eigentlich sollte nun in der ViewEntryCollection nur noch das enthalten
was den angegebenen Suchkriterien enspricht.
Andreas