Note: if you select a part of the document first, it will only remove the white space indents in all first lines of the selection.įor more detailed information about Remove All First Line Indent Spaces of Kutools for Word, please visit Remove Indents.
#How to remove a first line indent in word trial#
Free Trial for 45 days! Get It Now!Ĭlick Kutools > Remove indents > Remove All First Line Indent Spaces. Kutools for Word, a handy add-in, includes groups of tools to ease your work and enhance your ability of processing word document. With only one click, you can remove white space indents from all first lines in the document. Is there an easy way to remove white space indents in all first lines? Yes, Kutool for Word is your best choice. Remove whitespace(space character or tab character) indents in all first lines with Kutool for Word If i.Range.Characters(1).Text = " " Or i.Range.Characters(1).Text = " " Or i.Range.Characters(1).Text = Chr(9) ThenĪpplication.ScreenUpdating = True 'restore screen and refresh Sub remove_all_the_first_line_indent_spaces()Īpplication.ScreenUpdating = False 'close screen and refreshįor Each i In ActiveDocument.Paragraphs 'cycling in the pragraphs of the active document
#How to remove a first line indent in word code#
The VBA code of removing whitespace(space character or tab character) indents in all first line: Step 3: Then click Run button to apply the VBA.
Step 2: Click Module on the Insert tab, copy and paste the following VBA code into the Module window Step 1: Press “ Alt-F11” to open the Microsoft Visual Basic for Application window The indents have vanished.You can use the following VBA code to remove whitespace (space character or tab character) indents in all first lines in the document. You should find the cursor leaps an appropriate number of spaces along the box.Go to he Replace box and type in whatever you want to replace the indent with (if nothing then just click in the Replace box before the next step)Press on the Replace All box and Bob's your uncle as they say in England. You can't replace by simply typing ghe tab key directly into the Find box, because it will respond by moving the cursor to the next box, but it will accept the indented space if you copy it into the Find box with Copy and Paste.Ĭall up your document, go to the start of one of the indented spaces at the start of a paragraph, highlight it by holding down Shift +right arrow key, and copy with Control-C.Call up Find and Replace, put the cursor into the Find box, and Paste (Control-V). If the number is too wide, it forces the indent to jump to the next default tab stop. Click Run button or Press F5 key to apply the VBA code.Īctually I have found an easy way to do this, when I had a book typed in Word with the first line of each paragraph indented with the Tab key, and I wished to abolish the indents. Those define the 'First Line Indent' and the 'Left Indent'. If i.Range.Characters(1).Text = " " Or i.Range.Characters(1).Text = " " Or i.Range.Characters(1).Text = Chr(9) ThenĪpplication.ScreenUpdating = True 'restore screen and refreshģ. FirstLineIndent = CentimetersToPoints(0) VBA: Remove all indents from selection or the whole document in Word Sub remove_indents()
Press Alt + F11 keys together to open the VBA window, click Insert > Module to create a new Module window, and then paste below code into the window:
Select the paragraphs or the whole document you will remove all indents from.Ģ. If you are good at Macro, the VBA code is also available for you to remove all indents from selection or the whole Word document easily.ġ.