In Excel, you can get the Username by using
. The Username is what is entered on the General tab of Tools > Options. Inexplicably, you cannot get the user’s initials, but you can in some other Office programs. I read a suggestion to automate Publisher and get the user initials via that object model. That seems a little extreme to me.
This is what I’m using. It gets the first character of, up to, the first three words in Application.Username.
Dim vaNames As Variant
Dim sInit As String
Dim lMax As Long
Dim i As Long
vaNames = Split(UCase(Application.UserName), ” “)
lMax = Application.WorksheetFunction.Min(2, UBound(vaNames))
For i = 0 To lMax
sInit = sInit & Left$(vaNames(i), 1)
UserInitials = sInit