Hello all
with the following code:
Im getting a error message at Send function because outlook generates Name Correction. the Value in cell "X1" is in a loops so it changes after the send.
the value in "X1" contains employee number which is link to there actually corporates email. for example instead of typing John.smith15@company.com one can type John smith Employee number E123456 in To/CC/BCC to send him an email.
My issue arise when an employee has short employee number ex: E3924 outlook wants to use name check asking to select one of the following;
Although I just needed to send it to E3924. The code works great when the Employee number is unique. Had the "X1" value been e39240 it would had send it without name checking. What im needing is to be able to bypass the Name checking and just send the email to the actually value. I have tried changing the setting in outlook under FILE>OPTIONS>MAIL and unchecking the box for automatically Name Checking still does not work. any suggestions is greatly appreciated.
Thanks
with the following code:
VBA Code:
With oMail
.BCC = Range("X1").Value
.Subject = Range("X3").Value
.Body = "Hello " & Range("X2") & "," & vbCrLf & "Attached files are the Ramp bid and " & Range("A1") & "." & vbCrLf & _
Range("X4") & " you may use this bid form, however, please make sure you print, sign and drop it in the Bid box. " & vbCrLf & _
"Do not email your bid over." & vbCrLf & _
"Printed copies have also been posted. Good Luck!!" & vbCrLf & _
vbCrLf & _
vbCrLf & _
"Thank you," & vbCrLf & _
"SSO TEAM"
.Attachments.Add WB.FullName
.Attachments.Add bidfile
' .Display
.Send
Im getting a error message at Send function because outlook generates Name Correction. the Value in cell "X1" is in a loops so it changes after the send.
the value in "X1" contains employee number which is link to there actually corporates email. for example instead of typing John.smith15@company.com one can type John smith Employee number E123456 in To/CC/BCC to send him an email.
My issue arise when an employee has short employee number ex: E3924 outlook wants to use name check asking to select one of the following;
e3924 |
e39240 |
e39241 |
e39245 |
e39242 |
e39247 |
e39244 |
e39248 |
e39249 |
e39243 |
Although I just needed to send it to E3924. The code works great when the Employee number is unique. Had the "X1" value been e39240 it would had send it without name checking. What im needing is to be able to bypass the Name checking and just send the email to the actually value. I have tried changing the setting in outlook under FILE>OPTIONS>MAIL and unchecking the box for automatically Name Checking still does not work. any suggestions is greatly appreciated.
Thanks