有人可以告诉我如何添加" Cc收件人"这段代码? "收件人"并编码所有工作按预期。谢谢你的时间。
Sub ForwardEmail(item As Outlook.MailItem)
' Dim oExplorer As Outlook.Explorer
Dim oMail As MailItem
' Set oExplorer = Application.ActiveExplorer
On Error GoTo Release
' If oExplorer.Selection.item(1).Class = olMail Then
Set oMail = item.Forward
oMail.Subject = oMail.Subject
oMail.HTMLBody = "Have a nice day." & vbCrLf & oMail.HTMLBody
oMail.Recipients.Add "email address here"
' oMail.Save
oMail.Send
' End If
Release:
Set oMail = Nothing
' Set oExplorer = Nothing
End Sub
答案 0 :(得分:7)
set oRecip = oMail.Recipients.Add("email address here")
oRecip.Type = olCC
或
oMail.CC = "email address here"