【发布时间】:2018-10-18 17:16:09
【问题描述】:
我正在尝试修改我的宏,以便用附件回复所有内容,以便将我的老板的电子邮件也添加到抄送中,因为我必须经常这样做。
我试图从 here 或 here 合并它,但我不是专业人士并收到 424 错误:(
Set objRecip = objMail.Recipients.Add("theboss@thecompany.com")
oRecip.Type = olCC
能否请您帮忙修改当前宏以将电子邮件地址添加到 CC 中?
我当前的宏
Sub ReplyWithAttachments()
Dim oReply As Outlook.MailItem
Dim oItem As Object
Set oItem = GetCurrentItem()
If Not oItem Is Nothing Then
Set oReply = oItem.Reply
CopyAttachments oItem, oReply
oReply.Display
oItem.UnRead = False
End If
Set oReply = Nothing
Set oItem = Nothing
End Sub
Sub ReplyAllWithAttachments()
Dim oReply As Outlook.MailItem
Dim oItem As Object
Set oItem = GetCurrentItem()
If Not oItem Is Nothing Then
Set oReply = oItem.ReplyAll
CopyAttachments oItem, oReply
oReply.Display
oItem.UnRead = False
End If
Set oReply = Nothing
Set oItem = Nothing
End Sub
Function GetCurrentItem()
...
End Function
Sub CopyAttachments
...
End Sub
【问题讨论】:
-
似乎每行都有错字。 oReply not objMail
Set objRecip = oReply.Recipients.Add("theboss@thecompany.com")and objRecip not oRecipobjRecip.Type = olCC