Results 1 to 3 of 3
  1. #1
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post
    I am trying to write a macro to change the Heading 1 style to have a hanging indent from 1.25 inches. I run the following code yet nothing is changed. Am I missing anything?

    Sub TestThis()
    With ActiveDocument.Styles("Heading 1").ParagraphFormat
    .LeftIndent = InchesToPoints(1.25)
    .FirstLineIndent = InchesToPoints(-0.63)
    End With
    End Sub
    You know it's time to diet when you push away from the table and the table moves.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    As noted in your previous thread (Change Format of All Heading 1 Styles), manually applied changes will not be overruled when you change the style definition. So if you had already modified the indents of Heading 1 paragraphs, the hanging indent will have no effect.

    Run the macro from the thread I mentioned to reset the paragraph format. You should then see the hanging indent.

  3. #3
    3 Star Lounger Omega3's Avatar
    Join Date
    Jan 2004
    Location
    Los Angeles, California, USA
    Posts
    343
    Thanks
    2
    Thanked 1 Time in 1 Post
    Quote Originally Posted by HansV View Post
    As noted in your previous thread (Change Format of All Heading 1 Styles), manually applied changes will not be overruled when you change the style definition. So if you had already modified the indents of Heading 1 paragraphs, the hanging indent will have no effect.

    Run the macro from the thread I mentioned to reset the paragraph format. You should then see the hanging indent.
    Thank you Hans! I've made sure not to make that mistake again by putting a call your macro by inserting it at the beginning of each Heading 1, 2, 3, macros. It has penitrated into my mind now, finally!
    You know it's time to diet when you push away from the table and the table moves.

Posting Permissions

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