Amend email recipients in code

Schoscho17

New Member
Joined
Oct 2, 2017
Messages
4
I have the following Code that opens a UserForm that has 6 buttons that puts a certain project email list in the .cc line. The bug I am having is that when I actually delete and email in the email bar, the macro will remember it and put it back in the .cc line.

For example
I Have Email A B and C
I Delete All of those and change it to Email D E and F
The Code will run again and put A,B,C,D,E and F in the cc bar.

How do I get it to reread my .cc bar before it posts again?


Code:
Public List As String

Sub Multi_Email_Test()
    Dim Update As String
    Dim Email As Outlook.MailItem
    Set Email = Application.ActiveInspector.CurrentItem
        UserForm1.Show

    
    On Error Resume Next

    With Email
        .CC = Email.CC & ";" & List
        .Display
    End With
        

End Sub
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
It does that because that's what the code says to do. If you just want the names in List,

Code:
        .CC = List
 
Upvote 0
The .cc List will delete everything that's already in my .cc line

I would prefer that the code just add onto the end of the cc line
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top