Sometimes, when you compose an email, you may want to CC this mail to the email addresses in the message body. This article will guide you to get it in quick time.
For instance, someone ask you for some persons’ contact information, such as the email addresses. In this case, you may wish to let these persons know this matter when sending their contact information to others. Hence, you would like to copy the email addresses from message body to “CC” field. In general, you have to do it one by one manually. But it is too tedious and cumbersome. So, in the followings, we will introduce a far more intelligent way.
Copy Email Addresses Occurring in Body to “CC” Field When Composing
- At the very outset, press “Alt + F11” keys to launch Outlook VBA editor.
- Then, in the new window, put the following VBA code into an empty module.
Sub CopyEmailAddresses_FromBodyToCCField() Dim objMail As Outlook.MailItem Dim objMailDocument As Object Dim objDocRange As Object Dim objRecipient As Outlook.Recipient 'Get the current mail Set objMail = Application.ActiveInspector.CurrentItem Set objMailDocument = objMail.GetInspector.WordEditor Set objDocRange = objMailDocument.Range 'Extract email addresses from mail body With objDocRange.Find .ClearFormatting .Replacement.ClearFormatting .Text = "[A-z,0-9]{1,}\@[A-z,0-9,.]{1,}" .MatchWildcards = True .Wrap = wdFindStop .Execute End With 'Add the found email addresses as CC recipients While objDocRange.Find.Found Set objRecipient = objMail.Recipients.Add(objDocRange.Text) objRecipient.Type = olCC objDocRange.Collapse wdCollapseEnd objDocRange.Find.Execute Wend 'Resolve all recipients objMail.Recipients.ResolveAll End Sub
- After that, exit VBA editor and add this new macro to Quick Access Toolbar of Message window by referring to “How to Run VBA Code in Your Outlook“.
- Eventually, you can take a shot. Here is my actual instance.
- First off, I compose an email which contains a stack of email addresses in body.
- Then, click the macro button in Quick Access Toolbar.
- Immediately, when macro finishes, all the email addresses in body will be copied to “CC” field, like the screenshot below.
What If Your Outlook Data Gets Damaged
It’s well known that Outlook can get compromised due to a variety of factors, like human errors, sudden shut-down, Outlook inner software faults as well as your computer hardware malfunctions and so on. Thereby, in reality, many users have been ever subject to similar issues in Outlook. It is admitted that the most vexing and troublesome problem is Outlook file damage. In that situation, you’ll need to resort to professional PST recovery service or software, like DataNumen Outlook Repair.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including mdf fix and outlook repair software products. For more information visit www.datanumen.com
1