Word 2007 set paragraph formatting Hanging indents RRS feed

  • Question

  • Does anyone know the property for Paragraph format hanging indent.

    Due to conflict with heading styles and restart numbering, the current paragraph loses its indentation.

    Therefore my code checks if the selected paragraph is a specific heading. If yes then

    set left indentation

    set hanging indent

    First Line and Hanging Indent are different paragraph formats.

    Using the code the results are for heading style "Page 1 Para number".

    The paragraph formatted as:

    Left indentation = 0.65cm

    FirstLine = 0.02cm

    Tab stops = 0.65

    The results are for heading style "Page 1 Para number"

    The paragraph formatted as:

    Left indentation = 1.5cm

    FirstLine = 0.03cm

    Tab stops = -2.28cm

    Im sure I had this issue in the past and cant remember the solution, as it appears Hanging indent isn't as obvious as Hanging indent  :groan:

    TIA dd

                                Dim range As MSWord.Range = worddoc.Document.Range
                                Dim Selection As MSWord.Selection = worddoc.Document.Application.Selection
                                Dim paraStyle As MSWord.Style = CType(worddoc.Library.Application.Application.Selection.Paragraphs.Style, Microsoft.Office.Interop.Word.Style)
                                If InStr(1, paraStyle.NameLocal, "Page 1 Para number", CompareMethod.Text) > 0 Then
                                    With worddoc.Document.Application.Selection.ParagraphFormat
                                        .LeftIndent = worddoc.Document.Application.CentimetersToPoints(0)
                                        .FirstLineIndent = worddoc.Document.Application.CentimetersToPoints(0.65)
                                    End With
    end If

    Friday, December 12, 2014 2:27 AM


All replies