Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-08-2019, 06:43 AM   #1
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 288
Thanks: 470
Thanked 22 Times in 21 Posts
Tera is on a distinguished road
Recipient.Resolve method

It may be a stupid question. But what does Recipient.Resolve method do when sending an email using outlook?

Thanks.

Tera is offline   Reply With Quote
Old 11-08-2019, 06:49 AM   #2
The_Doc_Man
Happy Retired Curmudgeon
 
Join Date: Feb 2001
Location: Suburban New Orleans, LA, USA
Posts: 14,540
Thanks: 92
Thanked 1,680 Times in 1,559 Posts
The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold The_Doc_Man is a splendid one to behold
Re: Recipient.Resolve method

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.
__________________
I'm a certified grandpa (3 times now) and proud of it.
Retired over one year and survived being home all day with the wife. She must really love me.
If I have helped you, please either click the thanks or click the scales.
The_Doc_Man is offline   Reply With Quote
The Following User Says Thank You to The_Doc_Man For This Useful Post:
Tera (11-08-2019)
Old 11-08-2019, 07:16 AM   #3
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 288
Thanks: 470
Thanked 22 Times in 21 Posts
Tera is on a distinguished road
Re: Recipient.Resolve method

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 is offline   Reply With Quote
Old 11-08-2019, 07:28 AM   #4
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 288
Thanks: 470
Thanked 22 Times in 21 Posts
Tera is on a distinguished road
Re: Recipient.Resolve method

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.
Tera is offline   Reply With Quote
Old 11-08-2019, 08:23 AM   #5
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,722
Thanks: 57
Thanked 1,260 Times in 1,241 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Recipient.Resolve method

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!
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
Tera (11-08-2019)
Old 11-08-2019, 09:14 AM   #6
Gasman
Enthusiastic Amateur
 
Gasman's Avatar
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,332
Thanks: 432
Thanked 790 Times in 766 Posts
Gasman is a jewel in the rough Gasman is a jewel in the rough Gasman is a jewel in the rough
Re: Recipient.Resolve method

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.
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
The Following User Says Thank You to Gasman For This Useful Post:
Tera (11-08-2019)
Old 11-08-2019, 03:08 PM   #7
Tera
Newly Registered User
 
Join Date: Feb 2019
Posts: 288
Thanks: 470
Thanked 22 Times in 21 Posts
Tera is on a distinguished road
Re: Recipient.Resolve method

Quote:
Originally Posted by theDBguy View Post
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 by Tera; 11-08-2019 at 03:17 PM.
Tera is offline   Reply With Quote
Old 11-08-2019, 05:12 PM   #8
theDBguy
Iím here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 5,722
Thanks: 57
Thanked 1,260 Times in 1,241 Posts
theDBguy has a spectacular aura about theDBguy has a spectacular aura about
Re: Recipient.Resolve method

Quote:
Originally Posted by Tera View Post
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!

__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
The Following User Says Thank You to theDBguy For This Useful Post:
Tera (11-08-2019)
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a CC recipient jbkid Modules & VBA 1 02-07-2014 09:49 AM
Email only going to First recipient when there are multiple debson Modules & VBA 4 01-09-2014 06:15 PM
How to resolve the NULL value from SQL ? cheer Forms 1 12-07-2011 02:43 PM
Question Help me to resolve a problem jimd1768 General 1 02-18-2010 02:12 AM
It must be easy to resolve bhaycox Forms 7 02-06-2008 06:33 AM




All times are GMT -8. The time now is 08:06 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World