VBA error when creating an eMail from Excel in new Outlook (One Outlook)

Torsten_688 31 Reputation points
2022-12-08T07:59:45.863+00:00

Hello Community,

I have several places in Excel where I want to create an e-mail via Outlook in VBA.
I use the following vba-code for this:

Set MyOutApp = CreateObject("Outlook.Application")
Set MyMessage = MyOutApp.CreateItem(0)

With MyMessage
.To = "******@zzz.de"
.subject = "Test eMail
.body = "Test
.display
End With
Set MyOutApp = Nothing
Set MyMessage = Nothing

When I switch to the new Outlook (One Outlook), I get the error message:
"System error &H80080005 (-2146959355). Failed to start server."

So far, I have only read that the only option is to diversions via Power Automate.
This would be very inconvenient for me, as I need this command in many excel files.

Is there an easier way within Excel or is there a chance that this will still work until the final version of the new Outlook?

Best regards
Torsten

Outlook Windows Classic Outlook for Windows For business
Developer technologies Visual Basic for Applications
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.