Outlook does not recognize one or more names

R

Rahul

I am having an issue where when I override default reply mail and give
Response.To as some Outlook user name, I get an error which says "Outlook
does not recognize one or more names"

On further research I found that when there are identical names in outlook
i.e. for eg. Tyson, Mike and Tyson, Mike C then this issue occurs and for
rest other it works just fine. Outlook searches for all similar name though I
want it to pick only the exact name i.e. Tyson, Mike and not anything else.

We have stored the name Tyson, Mike in global variable and we pass it to
Response.To in Outlook code

Now, how do we make outlook send mail as it is and not look for multiple
similar names from Global Address List?

Code Snippet:

Sub Approved_Click()
On Error Resume Next
strAnswer = msgBox("Are you sure you want to Approve this form?",vbYesNo,
"Attempting to Send...")
if strAnswer = 6 Then
Application.ActiveInspector.CurrentItem.DeleteAfterSubmit = True
item.forward
If err.Number = 0 Then
Item.UserProperties("IncStatus").value="Response"
item.reply
End If
End If

If err.Number<>0 Then
strAnswer = Msgbox("Data Error occurred --
"&Err.description,vbWarning,"Form - Error")
On Error GoTo 0
Exit Sub
End if
End sub


Function Item_Reply(ByVal Response)
Response.To = Item.UserProperties("Assocname").Value
End Function

Item.UserProperties("Assocname").Value=item.SentOnBehalfOfName is the code
for assigning value in Assocname.

Any help in this regard will be really appreciated.

Thanks,
Rahul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top