KTTKTT
asked on
LotusScript Array used to capture entire contents of multivalue field - only getting first entry of multiple values
Trying to get the entire contents of the shortname field in the address book - only getting first entry in list.
Please assist.
Function FEmail (docx As NotesDocument) As String
With docx
Dim itemArray As Variant
Dim itemList List
Dim m As Integer
Dim NumFAlias As String 'Declare NumFAlias as type string
itemArray = docx.shortname
For m = 0 To Ubound (itemArray) ' Ubound is a function that returns a number of the highest index in the array itemArray - remember array start with a zero (0) index (if Ubound returns 7 there ' are 8 members in the array)
NumFAlias = itemArray(m) ' Use the value of shortname field
FEmail = Lcase$(NumFAlias & IDOMINIO)
Next m
End With
End Function
Please assist.
Function FEmail (docx As NotesDocument) As String
With docx
Dim itemArray As Variant
Dim itemList List
Dim m As Integer
Dim NumFAlias As String 'Declare NumFAlias as type string
itemArray = docx.shortname
For m = 0 To Ubound (itemArray) ' Ubound is a function that returns a number of the highest index in the array itemArray - remember array start with a zero (0) index (if Ubound returns 7 there ' are 8 members in the array)
NumFAlias = itemArray(m) ' Use the value of shortname field
FEmail = Lcase$(NumFAlias & IDOMINIO)
Next m
End With
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@Kitkit: I Agree sjef and Bill-Hanson. It would have been easier if you used Join. To answer your question, just change the ", " with " " or any delimiter you want.
ASKER
sjef_bosman: thanks for this example as well.
Bill-Hanson: I appreciate the thorough explanation on how the code was looping - that explained the problem. Just simply grabbing the shortnames to export to .xls.