[VBA] Error “Outlook Does Not Recognize One or More Names” at objMail.Send

目次

Environment

  • Windows Specification: Windows 10 Pro
  • Version: 20H2

Background

When I tried to send an email using VBA, I received the error “Outlook does not recognize one or more names.” When debugging, the error pointed to objMail.Send. I investigated this error and learned the cause.

Missing Semicolon (;)

To put it simply, I did not include a semicolon (;) at the end of the email addresses. I had multiple recipients in the “CC” field, and I stored their addresses in individual cells. I forgot that in Outlook, when sending to multiple people in “To” or “CC”, you must separate the email addresses with a ;. Since the cells contained only the email addresses without semicolons, VBA likely read them as a single connected string or an invalid format, causing the error. Please be careful when sending emails to multiple recipients.

よかったらシェアしてね!
  • URLをコピーしました!
  • URLをコピーしました!

この記事を書いた人

私が勉強したこと、実践したこと、してることを書いているブログです。
主に資産運用について書いていたのですが、
最近はプログラミングに興味があるので、今はそればっかりです。

目次