Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Activex component cannot create object Excel 365 for mac

696 views
Skip to first unread message

lamar spalding

unread,
Feb 22, 2021, 1:30:57 PM2/22/21
to
I have excel 365 on my PC and the VBA for sending email from excel to outlook works perfectly. I transferred the same code to excel 365 for mac and it will not run. Apparently the Outlook object reference is missing in the references library. I cannot find the Outlook Object in the references library and the library shows a message Missing: Microsoft Outlook 16.0 Object library

So I tried creating outlook as an object but it still fails (BTW I am not a programmer, found this on the web). The Microsoft Office 16.0 Object and Microsoft Excel 16.0 Object libraries are checked in references.

Send email
Dim olApp As Object
Set olApp = CreateObject("Outlook.Application")

this fails with error "Activex component cannot create object"

On my PC the following code works and the OutlookObject is in the reference library

Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)

but Fails on the MAC with a library missing error

What am I doing wrong or how do I get the missing library??

Thanks



Adrian Caspersz

unread,
Feb 23, 2021, 5:42:30 AM2/23/21
to
On 22/02/2021 18:30, lamar spalding wrote:
> I have excel 365 on my PC and the VBA for sending email from excel to outlook works perfectly. I transferred the same code to excel 365 for mac and it will not run. Apparently the Outlook object reference is missing in the references library. I cannot find the Outlook Object in the references library and the library shows a message Missing: Microsoft Outlook 16.0 Object library
>
> So I tried creating outlook as an object but it still fails (BTW I am not a programmer, found this on the web). The Microsoft Office 16.0 Object and Microsoft Excel 16.0 Object libraries are checked in references.

According to a post on stackexchange

https://apple.stackexchange.com/questions/335607/is-there-something-like-macros-in-outlook-2016-on-mac


"both Outlook and OneNote do not support VBA on the Mac (although Excel,
PowerPoint and Word do)".

A Workaround mentioned is Applescript.

--
Adrian C

Peter T

unread,
Feb 24, 2021, 11:15:42 AM2/24/21
to
"lamar spalding" <aioho...@gmail.com> wrote in message
I have excel 365 on my PC and the VBA for sending email from excel to
outlook works perfectly. I transferred the same code to excel 365 for mac
and it will not run. Apparently the Outlook object reference is missing in
the references library. I cannot find the Outlook Object in the references
library and the library shows a message Missing: Microsoft Outlook 16.0
Object library
====================================

Outlook can't be automated in 365 for Mac, start here with Ron de Bruin's
'Excel for Mac' site -

https://www.macexcel.com/examples/mailpdf/macoutlook/

Peter T


0 new messages