A simple function I came across going through some old code.
This code accepts a string and turns it into a names field, from which you can send a parameter to get the different types of name, such as Common, Canonical and Abbreviated.
This code accepts a string and turns it into a names field, from which you can send a parameter to get the different types of name, such as Common, Canonical and Abbreviated.
Function GetFormattedName(strName As String, param AsString) As String
Dim n As New notesname(strName )
Select Case param
Case "CN"
GetFormattedName= n.common
Case "Canonicalize"
GetFormattedName= n.canonical
Case "Abbreviate"
GetFormattedName= n.abbreviated
End Select
End Function
Dim n As New notesname(strName )
Select Case param
Case "CN"
GetFormattedName= n.common
Case "Canonicalize"
GetFormattedName= n.canonical
Case "Abbreviate"
GetFormattedName= n.abbreviated
End Select
End Function
No comments:
Post a Comment