extract email addresses from word documents

There may be times when we need to extract a bunch of email addresses from Microsoft Word documents. But searching them one by one will become laborious if these emails are scattered around multiple documents.

This guide will show you two quick ways to pull out all email addresses from Word documents without using any third-party tool. So let’s get started.

1. Extract Emails Using ‘Advanced Find’ Option

In addition to simply searching for words, phrases, and numbers, you can use special characters and wildcards in the Advanced Find feature in Word to extract all the emails at once. To do that, follow these steps:

  1. First of all, launch the Word program and open the document you want to extract the emails.
  2. Now, you will land on the Home tab by default. If not, click the Home tab.
  3. Next, you can see the Editing part on the right side of the ribbon. Click on the drop-down arrow next to the Find option. From the drop-down list that then appears, click on Advanced Find.
  4. In the Find dialog box, type [A-z,0-9]{1,}\@[A-z,0-9,\.]{1,} as a search string in the field provided.
  5. Then, click More >> to open various other options. Here, make sure to check the Use wildcards option.
  6. Click the Find in button to show the drop-down and then choose the Main document. It will find and highlight every email address in the word document, as shown in the screenshot below.
  7. Now all you need to do is to copy these emails to the clipboard. Either you can use the Copy button in the Clipboard section in the Home tab, or simply use the shortcut Ctrl + C.
  8. Now, all you need to do is to copy these emails to the clipboard. Either you can use the Copy button in the Clipboard section in the Home tab or use the shortcut Ctrl + C. Either will do fine.
  9. After that, open a Notepad document or a new document in Word and paste the copied items there using the paste button or Ctrl + V shortcut.

This way you can extract email addresses from Word documents effortlessly. Now, save them in your preferred location.

2. Extract Email Addresses From Word Using VBA

You can also use Visual Basic for Applications (VBA) to run customized codes to pull out emails easily. Here are the steps to do so.

  1. Launch the Word and then open the source document first.
  2. Now, open the VBA editor. If you have the Developer tab already enabled, you can directly click the Visual Basic option to launch the editor. Alternatively, you can use the Alt + F11 keyboard shortcut.
  3. Once the editor opens, click the Insert menu at the top and choose Module.
  4. In the new window that appears then, copy and paste the below-given codes.

Sub Extract()
Dim mailVariable As String
With ActiveDocument.Range
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[A-z,0-9]{1,}\@[A-z,0-9,\.]{1,}"
.Replacement.Text = ""
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchSoundsLike = False
.MatchWholeWord = False
.Forward = True
.MatchByte = False
.MatchAllWordForms = False
.MatchWildcards = True
.Execute
End With
Do While .Find.Found
mailVariable = mailVariable & .Text & ";"
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
If mailVariable <> "" Then
Documents.Add Template:="Normal", NewTemplate:=False, DocumentType:=0
ActiveDocument.Range.Text = mailVariable
End If
End Sub

  1. Now Run the code by simply pressing F5 on your keyboard.

Once you run the code, it will create a new document automatically with all the email addresses extracted from the source document. You can save the new record and use it as per your requirement.

Extracting Email Addresses Made Easy

When you need to send emails to several people at once, you may find it difficult if you do not have a clear list of email addresses. And things can get a bit tricky if you need to navigate through the entire documents and find them manually. But, with the two methods explained above, you can complete the task in a few seconds and use them however you want.

Furthermore, these are not limited to the native .doc and .docx files. Since Microsoft Word supports many formats, you can use these methods to extract emails from documents such as TXT, XML, and more.

Vishnu Mohan is the founder and fountainhead of Makmodo who hails from God's Own Country. He is an ardent tech geek who loves writing content on Windows, Android, security, tech hacks, and gadget reviews. Apart from the techy stuff, he enjoys listening to music, reading books, and playing cricket. In his free time, you can see him taking candid photographs or nurturing hanging orchids in his front yard.

LEAVE A REPLY

Please enter your comment!
Please enter your name here