Sending email messages programmatically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All,

I am building automated email messaging, populating the Subject, message and
recipients from within my application. I thought the Employee ID number
would be the safest way to identify the recipients uniquely, however it
appears that Outlook is using a wild card character to resolve the
recipients. Outlook finds every occurrence of the Employee ID number, as
part of any Employee ID number that starts with the same number. The
Employee ID number can be from one to five digits, and the email recipient
name is always preceded by an 'M' and any necessary leading zeros, such as
the following:

Employee # 123 needs to be (e-mail address removed)

Does anyone know how to force Outlook to use only the ID that I have provided?

Thanks,
 
Hi, Mike.

Here's one way to build your E-mail address string with a user-defined
format function to pad as many leading zeros as necessary (up to 4 in this
case):

strEmailName = "M" & Format(strEmpID, "00000") & "@CompanyName.com"

where strEmpID is a string that contains the numeric Employee ID.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)

- - -
When you see correct answers to your question, please sign in to Microsoft's
Online Community and mark these posts, so that all may benefit by filtering
 
Back
Top