Link to home
Start Free TrialLog in
Avatar of attila01
attila01

asked on

In which folder is a certain mail?

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)
Avatar of cezarF
cezarF
Flag of Australia image

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.
Avatar of attila01
attila01

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Bill-Hanson
Bill-Hanson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)
Wend

Enjoy
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.
Forced accept.

Computer101
EE Admin