Last active
August 29, 2015 14:24
-
-
Save clijsters/458dbb82ece7902b6c25 to your computer and use it in GitHub Desktop.
Revisions
-
clijsters revised this gist
Jul 14, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ 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 -
clijsters created this gist
Jul 14, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ 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