Recipient.Resolve method (1 Viewer)

Tera

Registered User.
Local time
Today, 15:12
Joined
Feb 2, 2019
Messages
972
It may be a stupid question. But what does Recipient.Resolve method do when sending an email using outlook?

Thanks.
 

The_Doc_Man

Happy Retired Curmudgeon
Local time
Today, 01:12
Joined
Feb 28, 2001
Messages
16,794
In composing a message, you name a person in the To or CC list. Let's say it is our old friend "Joe Blow." But Outlook can't send a message to Joe Blow. Recipient.Resolve attempts to find the "familiar" name in your address book and will try to convert it to some string such as "Joe.Blow3@obscurity.com" - a formal e-mail address to which Outlook CAN send a message.
 

Tera

Registered User.
Local time
Today, 15:12
Joined
Feb 2, 2019
Messages
972
If I don't use this resolve method, outlook sends the mail anyway and my friend receives it. (As long as the same name exists in my address book). I've tried it several time. Is there any reason to resolve the recipient?

I think outlook check the names in .To and resolves them before sending.

This is my test:
Code:
    Dim oApp As Object
    Dim oEmail As Object
    
    Set oApp = CreateObject("Outlook.Application")
    Set oEmail = oApp.CreateItem(0)
        
    With oEmail
        .To = "John Snow"
        .subject = "Test"
        .HTMLBody = "<p>test</p></body>"
        .Display
    End With
 

Tera

Registered User.
Local time
Today, 15:12
Joined
Feb 2, 2019
Messages
972
Doc, I hope you don't mind adding one more question:

Is it possible to do the opposite?
I mean I give an address to .To and outlook resolve it to a name?


The reason:
I have a database which a lot of users are using it. They have the same mail address in their address book, but it may be saved under different names. Some use English alphabet for their address book. Some use Japanese. The make it worse, in Japanese we can write the same name using three different alphabets.

Now if I want to send a report as a mail and use the name of receiver in .To and resolve it, outlook may not be able to find the name. because some may have it in Japanese, some in English.
 

theDBguy

I’m here to help
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
10,090
Hi Tera. I know you have seen this thread before, but have you looked at the code posted by sxschech about resolving names? Just curious, it might help with your situation. Good luck!
 

Gasman

Enthusiastic Amateur
Local time
Today, 07:12
Joined
Sep 21, 2011
Messages
5,709
I use Resolve in my emails and it has balked if I spelt the recipient's real name incorrectly.?

So it is a safety check for me.

Plus I do not need to keep track of their email addresses, just their names.
 

Tera

Registered User.
Local time
Today, 15:12
Joined
Feb 2, 2019
Messages
972
Hi Tera. I know you have seen this thread before, but have you looked at the code posted by sxschech about resolving names? Just curious, it might help with your situation. Good luck!
Sorry, I had seen the post but didn't bother to test the code. My bad.
I think it works for me now.
I'll come back again if I find any problem concerning it.

PS: I owe you a beer. :)
 
Last edited:

theDBguy

I’m here to help
Local time
Yesterday, 23:12
Joined
Oct 29, 2018
Messages
10,090
Sorry, I had seen the post but didn't bother to test the code. My bad.
I think it works for me now.
I'll come back again if I find any problem concerning it.

PS: I owe you a beer. :)
Hi. Glad to hear you got it to work. Cheers!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom