Extracting "CC to" addresses

I am trying to extract the “CC to” addresses from an outlook email.

I get stuck here… Tried to look for similiar topics in the forum but to no avail.

All I am trying to do is get the CC to addresses and print same in a Message box.

Also, what if there are more than 1 CC to recipients…


Thank you for your advice in advance.

Hello tennykim,
You need to set the For Each Activity’s TypeArgument property to MailMessage. By default it will be Object.

If there are more than one CC you will get comma separated values just like you see in outlook.


Hello @tennykim,

CC function returns a MailAddressCollection, if you need to access to each address you only have to loop the collection.

ExtractCC.xaml (7.4 KB)



True :+1:


Thanks Susana,

I will give this a go. Failing that, would you mind if I post a subsequent question(s)?

Kind regards,


1 Like

Hello @tennykim,

No problem, Please let me Know if I can help you further :slight_smile:



Thank you so kindly for your example.

I have run it and it worked fine. I am now able to extract the relevant values in CC field. I have now encountered another issue. It pulls as follows:-

>  Assign addressCC Closed
>  "person1" <person1@test.com>, "person2" <person2@test.com>
>  Write line Executing 
  1. How can I only pull the email address within < > only? (without person1 or 2 part in front).
  2. What do you think I should do in order for uiPath only to deal with 1 cc’ed person at a time? i.e. deals with person1@test.com, follows the sequence, upon completion, repeats the same steps for person2@test.com

I must apologise and thank you in advance for being a complete noob in this area. :stuck_out_tongue:



This could be a solution to my subsequent question 2 above…?

That is why you have the for each activty there

please take a look on the following screen.

single lines are the ones obtained from the for each.


@beesheep @Susana

Hi guys,

Thank you for your help. After many many attempts, it is now doing great.

Thanks for your support!



I just joined this group as i was searching how to extract cc email addresses from outlook. I am NOT a developer and am not tech savy.

Is there a dummified version of this that i can access? I am trying to extract all the email addresses(to, from and cc) that are in my outlook folders and export to a csv file. I want to create a database of names/ email addresses.
Is this possible? Thanks,