In which folder is a certain mail?

Posted on 2007-08-10
Last Modified: 2013-12-18
Hi All,
Is there a possibility for the following:
I open my mailbox in Lotus Notes, open the All Document view and see the mails and...
When I have a look at a certain mail I could decide in which folder this mail is.  (Supposing the mail is in a personal folder, not in Inbox or Sent Item)
Question by:attila01
    LVL 14

    Expert Comment

    1. if you want to move the mail to a particular folder, click the "Folder" button and select "Move to Folder" then select the folder where you want to move the mail.
    2. if you want to know in which folder(s) the mail is in, you need to write LS and use the FolderReferences property of the NotesDocument class.

    Author Comment

    You mean to create a new column in the All Documents view and give the LS as a value to that column?
    Can you help me with that LS?
    LVL 22

    Accepted Solution


    By default Domino does not store the folder references inside the document.  So, displaying the folder names in a view column is not possible.

    You can enable a database property called "FolderReferencesEnabled".  This will cause Domino to store the folder references in the "$FolderRef" field of each document.  The value stored in this field, however, is the folder's UNID, not the folder's name, so you still could not display the names in a view column.
    LVL 20

    Assisted Solution

    If you have version 7 (I think it started there?) you can go to all documents and then Folders->Discover Folders and it will list all the folders the message belongs to
    LVL 31

    Assisted Solution

    Yeah, definitely 7, 6 did not have it. A trick in 6 is to flip the unread mark for the doc on and off a bunch of times in a row, looking carefully to see which folder changes its unread count.  Either of these only works one document at a time.
    LVL 2

    Expert Comment

    1) Enable the [FolderReferencesEnabled] property of the database
    2) The database must have the $FolderInfo and $FolderRefInfo hidden views to support folder references. These views can be copied from the mail template.
    3) From your "all document" view, you will need to run an agent that will excute on unprocessed document.

    Inside your agent, you will do the folowing :

    Dim vColEntries As NotesDocumentCollection
    Set vColEntries = Session.CurrentDatabase.UnprocessedDocuments
    Dim vCurrentEntry As NotesViewEntry
    Dim doc as NotesDocument

    Set vCurrentEntry = vViewEntries.GetFirstEntry()
    While Not vCurrentEntry Is Nothing
        Set doc = vCurrentEntry.Document
        i = 0
        Forall FolderReference In doc.FolderReferences
             i = i+1
             Print doc.noteid, "", i, "", FolderReference
        End Forall
        Set vCurrentEntry = vViewEntries.GetNextEntry(vCurrentEntry)


    Author Comment

    What do you mean by saying "from the all document view"?
    When I create an agent then this can be called from the whole database not only from he all documents view.
    Or do you mean to create a new column in the all documents view and your script would be the column value?
    But there is only: Formula, Field and Simple Function.
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

      In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
    Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now