Consulting

Results 1 to 3 of 3

Thread: how to indent all paragraph numbers in word document to left without indenting text

  1. #1
    VBAX Newbie
    Joined
    Aug 2017
    Posts
    1
    Location

    how to indent all paragraph numbers in word document to left without indenting text

    I would like to indent all paragraph numbers in word 2016 document to leftmost position WITHOUT indenting text associated with those paragraphs. need VBA code for the same. when I indent paragraphs to left, associated text is also moving to left along with it. tried using "first line indent" ruler, but it requires fixed inches to specified. I would like to move it to leftmost position regardless of the current position of the paragraph numbers. Is this possible?
    With Selection.ParagraphFormat
    .SpaceBeforeAuto = False
    .SpaceAfterAuto = False
    .FirstLineIndent = InchesToPoints(0)
    End With

  2. #2
    VBAX Contributor
    Joined
    Jun 2014
    Posts
    107
    Location
    If you are using the styles you should be able set what you want in that style. I'm not sure you can do what you are trying to do since the text is based on the distance from the number. You could get the current value of .FirstLineIndent and calculate the distance needed and then set it to the new value.

  3. #3
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    Are these numbers typed, or automatic?
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •