Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looking for a method to select a mail document from an external database

3 views
Skip to first unread message

pingu

unread,
Mar 25, 2009, 1:49:54 PM3/25/09
to
Maybe I'm short of sugar but...
I'm not able to find a simple method to select (and link) one (or more)
personal email documents from within a notes application.

These is the state:

1. I don't want to modify the user personal db-mailbox (namely "db-mail")

2. The user of the new notes application (namely "db-app") must do the
following:

a. click on a button that shows a dialog list of personal emails (sent
and/or received),

b. select one or more emails and...

c. ...click on a button "get" that gets the selected-mail
contents, copying some data in the db-app.

It seems so simple but...

I tried to use a dialog with a listbox whose choices are made with a
concatenation of dbcolumn pointed to the $All view of the user mailbox.
It works, but it has a very ugly limit: the 32KB of text choices.
If the user have (as usual) a lot of email... it fails.

Any suggestion?

Thanx in advance.

pingu

pingu

unread,
Mar 31, 2009, 3:50:44 AM3/31/09
to
Annoying... it was simply trivial.
Sorry.

Karl-Henry Martinsson

unread,
Apr 3, 2009, 5:31:04 PM4/3/09
to
"pingu" <1...@456.789> wrote in message
news:49d1cb57$0$1129$4faf...@reader1.news.tin.it...

> Annoying... it was simply trivial.
> Sorry.

Perhaps you can post the solution, so people search in the future might
find it? ;-)

/Karl

=============
Visit my blog at http://www.bleedyellow.com/blogs/texasswede/


pingu

unread,
Apr 8, 2009, 10:33:29 AM4/8/09
to
Sorry... I thought it was too simple to be a valid tip.
Anyway... this is my solution.
Best regards!

Create a button and use a script code like this:
>----------------------------------------<
Option Declare

Sub Click(Source As Button)
Dim session As New NotesSession
Dim uiwk As New NotesUIWorkspace
Dim db As NotesDatabase
Dim maildb As NotesDatabase
Dim maildoc As NotesDocument
Dim mailcoll As NotesDocumentCollection
Dim reg As New NotesRegistration

Dim mailserver As String
Dim mailfile As String
Dim maildomain As String
Dim profile As String
Dim mailsystem As Integer
Dim i As Integer

'Get the user email database
Set db = session.CurrentDatabase
reg.RegistrationServer = db.Server
Call reg.GetUserInfo(session.UserName, mailserver, mailfile, maildomain, mailsystem, profile)

'Ask the user for mail selection
Set mailcoll = uiwk.PickListCollection(PICKLIST_CUSTOM, True, mailserver, mailfile, "($All)", "Email selection", "Please, select one or more email to process.")
For i=1 To mailcoll.Count
Set maildoc = mailcoll.GetNthDocument(i)
'... do something ...
Next
End Sub
>----------------------------------------<

0 new messages