I use CDO to resolve user names... Is that what you meant? Here is some sample code.
[tt]
Public Function CDOResolveUser(ByVal MailUser As String) As String
On Error GoTo ErrorHandler
Dim myName As String
myName = "CDOResolveUser(MailUser=" & MailUser & "

"
Dim objOutbox As Folder
Dim objNewMessage As Message
Dim objRecipients As Recipients
Dim objOneRecip As Recipient
If Not IsNull(objSession) Then
CDOResolveUser = Val(ConnectToMailbox(strLoginName))
If Val(CDOResolveUser) = 1000 Then GoTo ErrorHandler
End If
Set objOutbox = objSession.Outbox
Set objNewMessage = objOutbox.Messages.Add
Set objRecipients = objNewMessage.Recipients
Set objOneRecip = objRecipients.Add
With objOneRecip
.Name = MailUser
.Type = ActMsgTo
.Resolve showdialog:=False ' Get MAPI to determine complete E-mail address.
End With
CDOResolveUser = objOneRecip.Name
Set objOutbox = Nothing
Set objNewMessage = Nothing
Set objRecipients = Nothing
Set objOneRecip = Nothing
Exit Function
ErrorHandler:
Set objOutbox = Nothing
Set objNewMessage = Nothing
Set objRecipients = Nothing
Set objOneRecip = Nothing
CDOResolveUser = MailUser ' reset to what it was
End Function
[/tt]
Craig, mailto:sander@cogeco.ca
In the computer industry, there are three kinds of lies:
lies, damn lies, and benchmarks.