【问题标题】:Add a "CC recipient" to Outlook 2010 VBA将“抄送收件人”添加到 Outlook 2010 VBA
【发布时间】:2015-05-08 09:42:33
【问题描述】:

有人可以告诉我如何在此代码中添加“抄送收件人”吗? “收件人”和代码都按预期工作。感谢您的宝贵时间。

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

【问题讨论】:

  • 你试过oMail.CC吗?

标签: vba outlook


【解决方案1】:
set oRecip = oMail.Recipients.Add("email address here")
oRecip.Type = olCC

oMail.CC = "email address here"

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-03-04
  • 2018-09-18
  • 2011-10-26
  • 2011-11-15
相关资源
最近更新 更多