Search

What the Quote?

"It's hard to tell, when you have three legs."

Laura Tripcony

"So it's a little like 'E.T.', if E.T. was eating people."

Chris Toohey

"...and I swallowed my gum, 'cause I thought it was the Apocalypse."

Jennifer Holland

« Parsing formulas on the fly via @Eval and @While | Main| AJAX IM for Domino »

Probably useless - LotusScript toAcronym()

Category show-n-tell thursday
Not sure if there's a practical use for this, but if there is, enjoy:

Public Function toAcronym (Byval p_strFullName As String, Byval p_boolPunctuate As Boolean) As String
'Written on a whim by Tim Tripcony on 7/8/2006
    Dim intCharacterCode As Integer   
    Dim strAcronym As String
    Dim strFirstCharacter As String
    Dim varNameWords As Variant
   
    Let varNameWords = Split(p_strFullName)
    Forall strNameWord In varNameWords
        Let strFirstCharacter = Left$(strNameWord,1)
        Let intCharacterCode = Asc(strFirstCharacter)
        If ((intCharacterCode < 91) And (intCharacterCode > 64)) Then 'Only process words beginning with a capital letter
            Let strAcronym = strAcronym & strFirstCharacter
            If p_boolPunctuate Then
                Let strAcronym = strAcronym & "."
            End If
        End If
    End Forall
    Let toAcronym = strAcronym
End Function

Contact Me

Elsewhere

Assorted Linkage


Locations of visitors to this page