Outlook does not recognize names when email triggered from Macro

vijayendra.shukla

New Member
Joined
Jan 29, 2010
Messages
34
Hi MrExcel members,

I am new to the VB Scripting and this is my first ever post on any forums:).

Ok here i go with my problem -

I have written one macro which sends automatic email notification when certain condition is not fulfilled. This macro basically tracks a particular activity to be performed by each project member (no of project members is around 35). Each one of us have been given a unique user id which is mapped to the email address of that person. E.g. mine is XYvs9, where XY are constant and do not change and V and S are starting letters for my initials and surname. So following this pattern is someone with the same intial and last name joins the project, he/she is assigned in the same way like a8vs10 and so on...

i have stored all these user id's within the excel and taking reference to these user ids i am performing some validation and sending the email. If you manually type this user id in To/Cc box of Outlook, these user ids are autopopulated with the corresponding email ids. Yesterday when i ran my code i faced a weird situation where macro threw me the error "Outlook does not recognize one or more names.". After lots of research and ending up with no solution from web, I myself figured out Outlook is not able to resolve the user id-email mapping for particular users. When i researched more, I figured out a pattern where it was failing.

Suppose there are 20 people with initials and last names as V and S, then there will be user ids ranging from XYVS1 to XYVS20. and when you type any of the values from XYVS1 to XYVS9, outlook is not able to resolve the email id for that person. When i just typed XYVS1 and pressed CTRL+K keys, i got "Check Names" box where it says there are more than one names found for XYVS1. Actually it is not able make differentiation between XYVS1 and XYVS11. This problem is not seen when you type XYVS11, in this case it is giving me the correct email id for that user name.
Because of this my VB Code is failing for each user where this situation is encountered. I can resolve this problem by creating one more column and giving corresponding email ids for related user name within the macro, but i dont like this solution.
Is there any way i can handle this using code???

Thank you in advance for any help.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top