Results 1 to 3 of 3
  1. #1
    katrina1223 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Aug 2018
    Posts
    2

    Post Error message in Acess - Outlook does not recognize one or more names

    Hello!

    I recently upgraded my Outlook to 2016, and I am now receiving an error when I send out reminder emails to my tenants. The error seems to occur in the .Send area of the code provided below. Also, this error only occurs with email addresses that contain a period (i.e. Katrina.M.LastName@company.com)



    Private Sub RUN Click()

    ' Open a recordset on the expiring contracts
    Set db = CurrentDb
    Set rst = db.OpenRecordset("SELECT * FROM [INS TBL] WHERE [SEND EMAIL] = True")
    ' Loop through them all
    Do Until rst.EOF
    ' Make sure we have a valid email
    If Not IsNull(rst![VENDOR E-MAIL]) Then
    Dim objOutlook As Outlook.Application
    Dim objOutlookMsg As Outlook.MailItem
    Dim objOutlookRecip As Outlook.Recipient
    Dim objOutlookAttach As Outlook.Attachment

    ' Create the! Outlook session.


    Set objOutlook = CreateObject("Outlook.Application")

    ' Create the message.
    Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

    With objOutlookMsg
    ' Add the To recipient(s) to the message.
    Set objOutlookRecip = .Recipients.Add(rst![VENDOR E-MAIL])
    objOutlookRecip.Type = olTo

    ' Add the CC recipient(s) to the message.
    Set objOutlookRecip = .Recipients.Add(rst![E-MAIL])
    objOutlookRecip.Type = olCC

    ' Add the BCC recipient(s) to the message.
    Set objOutlookRecip = .Recipients.Add(rst![FINANCE EMAIL])
    objOutlookRecip.Type = olBCC

    ' Set the Subject, Body, and Importance of the message.
    .Subject = "Certificate of Insurance Expire Date Approaching"
    .Body = "ATTN: " & " " & rst![CONTACT PERSON] & &! quot; " & _
    & n! bsp; "-" & vbCrLf & vbCrLf & "Please be advised that the Certificate of Insurance for " & "" & rst![VENDOR NAME] & " has expired or will expire on " & _
    rst![CERTIFICATE EXPIRATION DATE] & _
    "." & vbCrLf & vbCrLf & "Please submit renewed Certificate of Insurance as soon as possible. If you have any questions, please contact me. Your cooperation is greatly appreciated." & vbCrLf & vbCrLf & "Thank you." &! vbCrLf & vbCrLf &
    .Importance = olImportanceHigh 'High importance

    ' Resolve each Recipient's name.
    For Each objOutlookRecip In .Recipients
    objOutlookRecip.Resolve
    Next

    ' Should we display the message before sending?
    If DisplayMsg Then
    .Display
    Else
    .Save
    .Send
    End If
    End With
    Set objOutlook = Nothing
    End If
    ' Get the next one
    rst.MoveNext
    Loop
    ' Close out
    rst.Close
    Set rst = Nothing
    Set db = Nothing
    End Sub



    Any help on how to resolve this error is greatly appreciated!!!

    Thanks!

    Kat

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    What is the error message number?

    I checked the syntax as below:
    RFC822 email address validator

    Valid

    "Katrina.M.LastName@company.com" is a valid email address.


    Here is the info re proper syntax.


    Local part



    The local part can be up to 64 characters in length and consist of any combination of alphabetic characters, digits, or any of the following special characters:
    ! # $ % & ‘ * + – / = ? ^ _ ` . { | } ~


    NOTE: The period character (“.”) is valid for the local part subject to the following restrictions:


    • it is not the first or last character
    • two or more consecutive periods

  3. #3
    katrina1223 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Aug 2018
    Posts
    2
    The error message number is:

    Run-time error -2147467259 (80004005) - Outlook does not recognize one or more names.

    Yesterday was the first time that error message has come up.

    Thanks!

    Quote Originally Posted by orange View Post
    What is the error message number?

    I checked the syntax as below:
    RFC822 email address validator

    Valid

    "Katrina.M.LastName@company.com" is a valid email address.


    Here is the info re proper syntax.


    Local part



    The local part can be up to 64 characters in length and consist of any combination of alphabetic characters, digits, or any of the following special characters:
    ! # $ % & ‘ * + – / = ? ^ _ ` . { | } ~


    NOTE: The period character (“.”) is valid for the local part subject to the following restrictions:


    • it is not the first or last character
    • two or more consecutive periods

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 10-27-2016, 09:11 AM
  2. VBA Outlook does not Recognize One or More Names
    By Ruegen in forum Programming
    Replies: 7
    Last Post: 12-06-2014, 12:02 PM
  3. Outlook error message using SendObject method
    By Juan23 in forum Programming
    Replies: 3
    Last Post: 07-10-2013, 12:03 PM
  4. Replies: 5
    Last Post: 04-23-2013, 08:07 AM
  5. Replies: 1
    Last Post: 07-21-2009, 03:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums