The following code produces a 4005 error. at the “putinfolder” method. Documents UNID’s are loaded up into an array via initArray sub.
There is no access issue as the ID I am using has manager access. The folder is a public folder. Have no idea why Notes still throws a 4005 error on this.
Sub addDocuments()
On Error Goto errHandle
Dim i As Integer
Dim session As New notesSession
Dim doc As notesDocument
Dim db As notesDatabase
Dim vw As notesView
Dim iCount As Integer
iCount = 0
Set db =session.CurrentDatabase
Call initArray()
For i = 0 To Ubound(vArr)
If Trim(vArr(i)) <> "0" Then
iCount = iCount + 1
Print "Documents added so far :" + Str(iCount)
Set doc = db.GetDocumentByUNID(vArr(i))
Call doc.PutInFolder("General", True)
End If
Next
Exit Sub
errHandle:
Messagebox Lsi_info(2) + " : " + Str(Err) + " - " + Error(Err) + ", at line " + Str(Erl)
Print Lsi_info(2) + " : " + Str(Err) + " - " + Error(Err) + ", at line " + Str(Erl)
Exit Sub
End Sub