1

I am trying to modify my macro for Reply All With Attachments to add also in CC my bosses e-mail because I have to do it often.

I was trying to incorporate it from here or here but I am no Pro and receive the 424 error :(

    Set objRecip = objMail.Recipients.Add("theboss@thecompany.com")
    oRecip.Type = olCC

could you please help modify the current macro to add an email address to CC?

my current macro

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
teaspoon
  • 115
  • 1
  • 1
  • 12
  • Appears there is a typo in each line. oReply not objMail `Set objRecip = oReply.Recipients.Add("theboss@thecompany.com")` and objRecip not oRecip `objRecip.Type = olCC` – niton Oct 22 '18 at 19:40

1 Answers1

0

I think the easiest way to do this is pull the CC list from the original email and then append it with your boss email:

If Not oItem Is Nothing Then
    Set oReply = oItem.Reply
    oReply.CC = oItem.CC & ";theboss@thecompany.com"
    CopyAttachments
    oReply.Display
    oItem.UnRead = False
End If