You can specify the paragraph number in the code.This code cannot remove the formatting made by, and. Note: this VBA will remove all formatting between paragraph 2 and paragraph 4. You do that by following these steps: Display the Home tab of the ribbon and then click the small icon at the bottom-right of the Styles group. Sub ClrFmtg2()ĪctiveDocument.Range(Start:=ActiveDocument.Paragraphs(2).Range.Start, _Įnd:=ActiveDocument.Paragraphs(4).Range.End).Select Turn off the setting in Word that causes explicit formatting to be absorbed into the underlying styles. VBA: remove all formatting from specified paragraph in document. Ever need to quickly clear all formatting from a selected group of text in Microsoft Word 2003, including any font changes, colors, text alignment, tabs, etcHere are three ways to clear text formatting, reverting the format to the Normal style. Kutools for Word, a handy add-in, includes groups of tools to ease your work and enhance your ability of processing word document. Summary: Three ways to clear formatting from the selected text. And this code just can remove the formatting from all texts. This code cannot remove the formatting made by, and. Note: Before you use this code to remove formatting, you need to select the part you want to remove formatting in your document. VBA: remove all formatting from the active document. Step 3: Click Run button to apply the VBA code (or press F5) Within the Home tab, in the Font section, locate and.
From the menu ribbon, click on the Home tab located to the right of the File tab. Step 2: Click Module in Insert tab, and insert the VBA code into Module window To select all text, press CTRL + A anywhere on the document. Step 1: Press Alt+F11 to open the VBA (Microsoft Visual Basic for Applications) window in Word You can also use a VBA code to remove all formatting from the document in Word. Note: This function cannot remove the formatting made by, and. Step 2: Then apply Clear Formatting as follows: Step 1: Select a part of the document you want to remove all formatting or press shortcuts CTRL+ A to select the whole document if you need to remove formatting from entire document.