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.
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.