You can specify the paragraph number in the code.This code cannot remove the formatting made by, and. You can also do this by highlighting the text you want to delete, right clicking on the highlighted portion, and selecting Cut from the context menu that appears. Note: this VBA will remove all formatting between paragraph 2 and paragraph 4. If you don’t have any fancy formatting in your document, you could manually highlight the contents of that page and use either the Backspace button or Delete button to erase the text on the page you want to get rid of. Sub ClrFmtg2()ĪctiveDocument.Range(Start:=ActiveDocument.Paragraphs(2).Range.Start, _Įnd:=ActiveDocument.Paragraphs(4).Range.End).Select VBA: remove all formatting from specified paragraph in document. Kutools for Word, a handy add-in, includes groups of tools to ease your work and enhance your ability of processing word document. 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) Step 2: Click Module in Insert tab, and insert the VBA code into Module window 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |