I am trying to use the NT id of the person logged into the computer to sign an email. I am trying to translate the ID into the First Name, Last Name & Telephone Number of the person (all are stored on the company address book). I use the below code to get the NT User ID:
Code
Private Declare Function GetUserName Lib "advapi32.dll" _
Alias "GetUserNameA" ( _
ByVal lpBuffer As String, _
ByRef nSize As Long) As Long
Public Property Get username() As String
Dim stBuff As String * 255, lAPIResult As Long
Dim lBuffLen As Long
lBuffLen = 255
lAPIResult = GetUserName(stBuff, lBuffLen)
If lBuffLen > 0 Then username = Left(stBuff, lBuffLen - 1)
End Property
Display More
How do I take the username and look up the contact infor from the outlook address book?