"More than One Message or Notes Control" error in VBA when creating Outlook mail item.

Automating Outlook from within Excel (2016) using VBA, I'm using fairly standard code to create a new mail object, set the To, Subject, Attachments, and Body, and display.
On Error Resume Next
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
    Set oOutlookApp = CreateObject("Outlook.Application")
End If

Set oItem = oOutlookApp.CreateItem(olMailItem)

With oItem
    .To = tostring
    .Subject = "Project Field Schedule: " & skeddeets.Cells(3, 2) & " " & skeddeets.Cells(3, 4)
    .Attachments.Add savedname
    .Body = "Attached please find the latest Field Schedule for the " & skeddeets.Cells(3, 2) & " " _
    & skeddeets.Cells(3, 4) & " project." & vbCrLf & vbCrLf & vbCrLf
    .Display  '.Send
End With

Open in new window

Sometimes it works fine, but about half the time I get this error message:
error
When I dismiss the error a looking at the new mail item, I can in fact see multiple redundant fields in the new email "form."  And I can't edit the body or send the email.  Where did these 'ghost' fields come from?  I've never seen these when I create a New Email from within Outlook.  How can I fix this error?  Thanks!
fields
Bryce BassettFreelance VBA programmerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
it is obvious that you are missing some code

 .Attachments.Add savedname   << not defined
0
Bryce BassettFreelance VBA programmerAuthor Commented:
Thanks, David.  This is only a snippet of my code.  savedname in the full path to the file I want to attach.  It is defined in a prior section and, as you can see in the second screenshot, the attachment is being attached properly.  I'm pretty sure this is not what is causing the error.

any other thoughts?
0
Kevin CasarezSystems AdministratorCommented:
This just started popping up for me yesterday using the .Net C++ Outlook Interop components.  I think Microsoft may have updated the latest version of Outlook in a way that broke their interoperability APIs, because I have a user still running Office 2013, and they're working fine.  What I don't know now is if there's going to be an update for the interoperability, or if Office is going to need to be updated to fix what was broken.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Bryce BassettFreelance VBA programmerAuthor Commented:
Good to know I'm not the only one, Kevin.  Please let me know if you come upon a solution.  Thanks.
0
Kevin CasarezSystems AdministratorCommented:
I just checked back on this issue, and without changing any code, this issue has resolved itself in my environment.  I'm guessing Microsoft has patched Office 2016. Bryce, are you still experiencing this issue?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bryce BassettFreelance VBA programmerAuthor Commented:
Thanks for checking back, Kevin.   This project has been on hold since I last wrote, but I went in just now and tested a bunch of times and the error no longer occurs for me either.  So hopefully they have fixed it.  Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.