在Mac上使用Excel VBA创建新邮件 [英] Create new mail on Mac using Excel VBA
本文介绍了在Mac上使用Excel VBA创建新邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要调整下面所述的宏,使其可以使用Apple Mail应用程序在Mac上运行.
I need to adjust my macro described below that it runs on mac with using Apple Mail application.
Sub SendMail()
Dim OutlookApp As Object: Set OutlookApp = CreateObject("Outlook.Application")
Dim var As Variant: var = Selection.Value
Set MyMail = OutlookApp.CreateItem(0)
With MyMail
.To = var(1, 8)
.Subject = "Skuska"
.body = "Dobry den...bla bla bla" & vbNewLine & vbNewLine & var(1, 2) & vbNewLine & var(1, 3) & vbNewLine & var(1, 5) & " " & var(1, 4) & vbNewLine & vbNewLine & "Tel.c.:" & vbNewLine & var(1, 6) & vbNewLine & var(1, 7) & vbNewLine & vbNewLine & var(1, 9) & vbNewLine & vbNewLine & "S pozdravom" & vbNewLine & "Meno" & vbNewLine & "Tel."
.sent
End With
End Sub
此宏与Outlook一起运行,但我使用的是Apple Mail.
This macro run with Outlook but I´m using Apple Mail.
推荐答案
Mac 2011(或Apple Mail)的Outlook不支持VBA.据我所知,可以使用Applescript和/或Automator来实现Mac或Apple Mail的Outlook自动化.有关更多信息,请参见脚本邮件简介.
Outlook for Mac 2011 (nor Apple Mail) does not support VBA. As far as I know automation of Outlook for Mac or Apple Mail can be accomplished using Applescript and/or Automator. See Introduction to Scripting Mail for more information.
这篇关于在Mac上使用Excel VBA创建新邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文