Hello,
When running my code I get the following error (database \dbname has not been open yet).
here is a piece of my code;
Dim db As New NotesDatabase “” , “mailbox.nsf”)
Dim view As NotesView
Set view = db.GetView (“Date Collection”)
Dim doc As NotesDocument
Set doc = view.GetFirstDocument
'Dim temp variables
Dim vMth As Variant
Dim vYr As Variant
Dim vMthYr As Variant
Dim sMth As String
Do Until doc Is Nothing
vMth = Left(doc.GetItemValue(“DateComp”)(0),3)
vYr = Right(doc.GetItemValue(“DateComp”)(0),4)
vMthYr = vMth & vYr
sMth = Month(Today)
If sMth = “1” Then
If vMthYr = “Dec” & Year(Today) Then
Call doc.PutInFolder(“Dec” + Year(Today))
End If
End If
If sMth = “2” Then
If vMthYr = “Jan” & Year(Today) Then
Call doc.PutInFolder(“Jan” + Year(Today))
End If
End If
Set doc = view.GetNextDocument(doc)
Loop