逗人,
我发布此问题,因为其他邮件中的VBA代码未执行我的目的
为什么我不能将.CC添加到我的代码并执行,它会抛出错误
Sub exporttoemail2()
Dim OutlookApp As Object
Dim MItem As Object
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Recipient As String
Dim Msg As String
Dim strLocation As String
Set OutlookApp = CreateObject("Outlook.Application")
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = Range("D2") & ";" & Range("E2") & ";" & Range("F2")
.Subject = "Hilti SOA - *Payment Notification* - " & Range("A2") & " - " & Range("B2")
.htmlbody = "Body"
strLocation = Range("G2")
.Attachments.Add (strLocation)
.Display
End With
End Sub
我caanot添加.CC功能顺利执行请帮助,如果我可以循环列表中的每一行也可以帮助
请参阅excel文件enter image description here
的快照答案 0 :(得分:0)
.cc应该正常工作
.cc = "YourEmail@Email.com;"
您收到了什么错误?