Hello,
One of our senior directors in the company want a facility wherein i he goes to All Documents view and select a document , he should know in which folder the document is.
I managed to get hold of Folder Reference property and also enabled Folder reference on the database. Now, this is not working on all the documents . I mean for some it tells me the folder name but for some it does not. As he has “N” number of private folders , it becomes somewhat difficult to trace the document.
Here is the script I’m using for getting the folder name :
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
If(db.FolderReferencesEnabled) Then
Else
Messagebox(“Folder references are not enabled”)
Messagebox(“Enabling folder references”)
db.FolderReferencesEnabled = True
End If
Dim doccoll As NotesDocumentCollection
Set doccoll = db.UnprocessedDocuments
Set doc = doccoll.GetFirstDocument
While Not(doc Is Nothing)
i = 0
Forall FolderReference In doc.FolderReferences
i = i+1
Print i, “”, FolderReference
End Forall
Set doc = doccoll.GetNextDocument(doc)
Wend
Exit Sub
Any help is much appreciated.
Thanks
Tom