

Highlight all the text you want this to happen to (otherwise it'll only work on the line where the cursor is) and drag the triangle to the right. If the number is too wide, it forces the indent to jump to the next default tab stop. The code that automatically performs a first line indent to the tab level of the preceding heading is the original Sub from the first example: Option Explicitĭim firstIndent As Double 'value in "points"įirstIndent = myDoc.Styles(para.Style).ParagraphFormat.LeftIndentĭebug.Print para.Style & " first tab stop at " & _ĭebug. Those define the 'First Line Indent' and the 'Left Indent'.

UPDATE2: the sample text original I used in shown in this first document: The code update below accurately determines each Heading indent tab stop. UPDATE1: the earlier version of the code below set the paragraphs to the Document level first tab stop, and did not accurately grab the tabstop set for the Heading styles. If so, then pick off the value of the first tab stop to set as the indent for the subsequent paragraphs.

Then click on the Decrease Indent button in the Paragraph group. Then select the Home tab in the toolbar at the top of the screen. (By default, tabs are set every 0.5 inch.) You can press Ctrl+. Answer: Select the text that youd like to remove the indent from. To use a macro to accomplish this, you have to check each paragraph in your document and check to see if it is a "Header" style. You can press Ctrl+T to create a hanging indent that aligns body text with the first tab marker.
