VBA:在Excel for Mac 2011中通过Outlook发送邮件 [英] VBA: Send mail via Outlook in Excel for Mac 2011
问题描述
设置邮件= CreateObject( Outlook.Application)
其中出现错误
ActiveX组件无法创建对象
这似乎是可信的,因为没有ActiveX Mac。
我试图找到替代解决方案,但是
- 他们是相当日期(2011年)
- 该宏必须在Mac和Windows上工作
什么目前是通过Outlook在Office Mac 2011发送邮件的最佳VBA方式?
正如你所说,Mac没有 ActiveX
组件。
对于你r VBA,使用上述链接来处理Mac的情况,并使用如果
语句(请参见下面的伪代码):
如果Application.OperatingSystem =MAC或Application.OperatingSystem =Macintosh或...
DoMacSendMail
Else
DoWindowsSendMail
结束如果
On a Mac, Office 2011 (latest patches) I want to send a mail via Outlook
Set mailer = CreateObject("Outlook.Application")
which gives the error
ActiveX component can't create object
which seems believable since there is no ActiveX on the Mac.
I tried to find alternative solutions, but
- they are quite dated (2011)
- the macro has to work on both Mac and Windows
What is currently the best VBA way to send a mail via Outlook in Office Mac 2011?
cf/ http://msdn.microsoft.com/en-us/library/hh859489(v=office.14).aspx
As you note, Mac does not have ActiveX
components.
For your VBA, use the above link to handle the Mac case, and use an if
statement (see pseudo-code below):
If Application.OperatingSystem = "MAC" Or Application.OperatingSystem = "Macintosh" OR ...
DoMacSendMail
Else
DoWindowsSendMail
End If
这篇关于VBA:在Excel for Mac 2011中通过Outlook发送邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!