Function ResolveRecipient(strSearch As String) As Outlook.Recipient If String.IsNullOrEmpty(strSearch) Then Throw New Exception _ ("Empty string was given to ResolveRecipient Function.", _ New NullReferenceException("strSearch at ResolveRecipient IsNullOrEmpty")) End If Dim App As Outlook.Application = New Outlook.Application Dim NS As Outlook.NameSpace = App.Session Dim rec As Outlook.Recipient = NS.CreateRecipient(strSearch) If rec.Resolve Then Return rec Else Throw New Exception("Unable to resolve Recipient") End If End Function