You can simply save the document with extracted email addresses and use them as required.Īs Microsoft Word supports a variety of document formats, these email address extraction methods can be used for a non-Word document too, such as XML, ODT, etc. A Macros dialog window will open up where you need to select the created macro and then click the Run button.Īs you click on the Run button, a new Word document will open up with all the extracted email addresses from the Word document. Then, go to the Run menu and click on the Run Macros option or simply the F5 key. ' Open a new document to paste the email addresses.ĭocuments.Add Template:="Normal", NewTemplate:=False, DocumentType:=0Ī = strEmailAddresses ' Extract all email addresses in a document. Next, in the VBA Editor window, go to the Insert menu and click on the Module option.Īfter that, in the right section, enter the below VBA code in the editor window: Sub ExtractAllEmailAddressesFromDocument() If you have enabled the Developers tab on the main ribbon, you can go to the Developer tab and click on the Visual Basic option to open up the VBA Editor. Now, launch the VBA Editor using the Alt + F11 key combination. Run the VBA code to extract all email addresses.įirst, open the Word app and then import the input Word document from which you want to extract all email addresses.Enter the VBA code for email address extraction.Open the Word app and then import the source document.You can also use a simple Visual Basic for Applications (VBA) code in order to extract all email addresses from Word documents. 2] Use VBA code to extract all email addresses from a Word document Read: How to disable Splash Screen in Office programs. You can now save the document with extracted email addresses from the Word document and use the email addresses however you want. Next, create a blank Word document or open the Notepad app and simply paste the copied email addresses using the dedicated option or Ctrl + V hotkey. It will copy all the email addresses present in the Word document to the clipboard. Alternately, you can also use copy hotkey i.e., Ctrl +C shortcut key. Now what you have to do is that click on the Copy button present in the Home tab. Then, click on the Find In drop-down button and select the Main Document option.Īs you do that, all the mail addresses will be highlighted and selected in the source Word document, as shown in the below screenshot. In the Find and Replace dialog box, from the Find tab, enter the string in the Find what field.Īfter that, press the More button which will open up various options. This will open up a Find and Replace dialog box. Now, in the Home tab, go to the Editing section and click on the Find drop-down button. Create a new blank document and paste copied email addresses.įirstly, run the Microsoft Word application on your PC and then import a Word document that contains the email addresses that you want to extract.Return to the main document and use the Copy option.Click on the Find In > Main Document button. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |