Dear All,I have a little problem on the use of “Prompt”: this is a piece of script I have written to prompt a list of names that is on the “members” field.
names = doc.Members
delete_list = w.Prompt(PROMPT_OKCANCELLISTMULT,_
“Select a Name”,“Select one or more names as recipients for this request.”, “”, names)
I would like to have the names prompted “Abbreviate” and not hierarchical name, removing the component labels, just to make it looking friendlier.
Now the name is displayed as CN=Name Surname/O=Organization. … I would like to have it displayed as "Name Surname/Organization.
Any Idea?
Thank you in advance
Andrea
Subject: Prompt a Name List
Something like this would do it:
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim Doc As NotesDocument
Dim names As Variant
Dim AbbNames() As String
Dim TmpName As NotesName
Dim IDX As Long
Set uidoc = workspace.CurrentDocument
Set Doc = UIDoc.Document
IDX = 0
names = doc.Members
Redim AbbNames(Ubound(names))
Forall person In names
Set TmpName = New NotesName(person)
AbbNames(IDX) = TmpName.Abbreviated
IDX = IDX + 1
End Forall
delete_list = workspace.Prompt(PROMPT_OKCANCELLISTMULT,_
"Select a Name","Select one or more names as recipients for this request.", "", AbbNames)
Subject: RE: Prompt a Name List
Thank you Tom!Working perfectly!
bye
Andrea