Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hi all,

    In Word 2007 how do you set the indentation of lists?

    1. I am looking for a Numbering dialog box a la Word2003 that let me set the indentation of lists styles.
    I have been trying set the indentation of lists using the Paragraph dialog box, but the lists have become completely unstable.

    2. I have been looking for Modify Style for Multi-level lists. I found the Create Multi-level List, but how do I later modify the style once I have created it?

    TIA

    avi

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Does this thread help?
    New Style Level (2007)
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    2 Star Lounger
    Join Date
    Dec 2007
    Posts
    179
    Thanks
    3
    Thanked 0 Times in 0 Posts
    [quote name='Andrew Lockton' post='764996' date='12-Mar-2009 12:45']Does this thread help?
    New Style Level (2007)[/quote]


    Thanks for the response.

    Well I just took a look at it.

    <Gulp> That will take a me an .. um .. long time to work through. At first glance - it looks terrible.

    In Word 2003, I never used to use the built-in auto lists. I only ever used SEQ fields for numbering (also for multi-level) and manually inserted symbols for bullets. (Years ago, my first TW supervisor as a freelance subcontractor told me: "rule of thumb - NEVER use Word's built-in auto numbering.)

    I had been hoping that in Word2007 MS had finally fixed the list styles.

    Nope.

    And when you copy/paste list styles (Ctrl+Shft+C, Ctrl+Shft+V) they lose their indentation and jump around like crazy.

    For Word 2003, I eventually programmed my own VBA add-in package that uses SEQ and symbols to imitate the way Word was supposed to do them, but doesn't work. I called my package by the name WWL, for 'Working Word Lists'. And work they do. And even better, if there are bugs, I can fix them.

    But I haven't yet learned how to manage add-ins in Word 2007. So I have (temporarily) lost my "Word Guru" title ...

    Thanks,

    - avi

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    [quote name='amakeler' post='765004' date='12-Mar-2009 23:35']Years ago, my first TW supervisor as a freelance subcontractor told me: "rule of thumb - NEVER use Word's built-in auto numbering.)
    For Word 2003, I eventually programmed my own VBA add-in package that uses SEQ and symbols to imitate the way Word was supposed to do them, but doesn't work. I called my package by the name WWL, for 'Working Word Lists'. And work they do. And even better, if there are bugs, I can fix them.[/quote]
    I have always used automatic numbering with a series of macros and have never had an unsolveable problem. This has always been less labour intensive than a SEQ field method but I concede that without macros you are always going to be running into problems with lists. The macros have evolved over the years/versions but the basic premise is to use the core macro every time you want to create or apply a list. This ensures the list attributes don't get corrupted. One of the side benefits of using the autonumbering is you can indent/outdent levels by using the ALT-SHIFT-ArrowRight or Left. One such macro is attached below.
    [codebox]
    Sub ListDefineAndApply()
    ' Macro created by Chrysalis Design Pty Ltd
    ' Resets the outline levels for the List styles

    Dim iStartIndent As Integer
    Dim iListStep As Integer
    Dim myListTemplate As ListTemplate
    Dim Lev As Variant

    'Set the starting indent and the step in for each level
    iStartIndent = 0
    iListStep = CentimetersToPoints(0.8)
    Set myListTemplate = ListGalleries(wdOutlineNumberGallery).ListTemplate s(1)

    'Apply the List Style (this style must already be in the document)
    Selection.Style = ActiveDocument.Styles("List")

    'Define the multi level list
    For Each Lev In myListTemplate.ListLevels
    Lev.Alignment = wdListLevelAlignLeft
    Lev.NumberPosition = iStartIndent
    Lev.TrailingCharacter = wdTrailingTab
    Lev.TabPosition = iStartIndent + iListStep
    Lev.TextPosition = iStartIndent + iListStep
    Lev.StartAt = 1
    Lev.LinkedStyle = "" 'stops linking of a style (override on first 3)
    With ActiveDocument.Styles("Normal").Font
    Lev.Font.Bold = .Bold
    Lev.Font.Italic = .Italic
    Lev.Font.Color = .Color
    Lev.Font.Size = .Size
    Lev.Font.Name = .Name
    End With
    Select Case Lev.Index
    Case 1
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%1."
    Lev.LinkedStyle = "List"
    Case 2
    Lev.NumberStyle = wdListNumberStyleLowercaseRoman
    Lev.NumberFormat = "%2."
    Lev.LinkedStyle = "List 2"
    Case 3
    Lev.NumberStyle = wdListNumberStyleArabic
    Lev.NumberFormat = "%3."
    Lev.LinkedStyle = "List 3"
    Case 4
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%4)"
    Case 5
    Lev.NumberStyle = wdListNumberStyleLowercaseRoman
    Lev.NumberFormat = "%5)"
    Case 6
    Lev.NumberStyle = wdListNumberStyleArabic
    Lev.NumberFormat = "%6)"
    Case 7
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%6.%7)"
    Case 8
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%6.%7.%8)"
    Case 9
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%6.%7.%8.%9)"
    End Select
    iStartIndent = iStartIndent + iListStep
    Next Lev

    myListTemplate.Name = "List"
    Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=myListTemplate, _
    ContinuePreviousList:=False, ApplyTo:=wdListApplyToWholeList
    Reset 'clears buffer
    End Sub[/codebox]
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts
    Andrew,

    Nice example code, but where do you set the value of iListStep?

  6. #6
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    [quote name='StuartR' post='765200' date='13-Mar-2009 18:56']Nice example code, but where do you set the value of iListStep?[/quote]
    Thanks for the error catching Stuart, I have amended the code to fix that oversight. I had remembered to set iStartIndent but forgot the iListStep one.

    The code I use has two global variables for the starting indent iStartIndent and the step in for each level (iListStep). That way the same indents can be used for the bullet list series and the number list series as well - both of which are maintained with a similar macro to that one.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    New Lounger
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='Andrew Lockton' post='765337' date='14-Mar-2009 11:20']Thanks for the error catching Stuart, I have amended the code to fix that oversight. I had remembered to set iStartIndent but forgot the iListStep one.

    The code I use has two global variables for the starting indent iStartIndent and the step in for each level (iListStep). That way the same indents can be used for the bullet list series and the number list series as well - both of which are maintained with a similar macro to that one.[/quote]

    Hi Andrew, can this be modified for 2007? I get errors at each step:

    [codebox]
    Sub ListMulti()
    ' Macro created 3/12/99 by Chrysalis Design Pty Ltd
    ' Resets the outline levels for the List Multi styles

    Dim iStartIndent As Integer '?
    Dim iListStep As Integer '?
    Dim myListTemplate As ListLevels '?
    Dim Lev As Integer '?


    'Set the starting indent and the step in for each level
    iStartIndent = 0
    iListStep = CentimetersToPoints(0.8)
    Set myListTemplate = ListGalleries(wdOutlineNumberGallery).ListTemplate s(6)

    'Apply the List Multi Style
    Selection.Style = ActiveDocument.Styles("List Multi")

    'Define the multi level list
    For Each Lev In myListTemplate.ListLevels 'Compile Error ListLevels method or data member not found
    Lev.Alignment = wdListLevelAlignLeft
    Lev.NumberPosition = iStartIndent
    Lev.TrailingCharacter = wdTrailingTab
    Lev.TabPosition = iStartIndent + iListStep
    Lev.TextPosition = iStartIndent + iListStep
    Lev.StartAt = 1
    With ActiveDocument.Styles("Normal").Font
    Lev.Font.Bold = .Bold
    Lev.Font.Italic = .Italic
    Lev.Font.Color = .Color
    Lev.Font.Size = .Size
    Lev.Font.Name = .Name
    End With
    Select Case Lev.Index
    Case 1
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%1."
    Lev.LinkedStyle = "List Multi"
    Case 2
    Lev.NumberStyle = wdListNumberStyleLowercaseRoman
    Lev.NumberFormat = "%2."
    Lev.LinkedStyle = "List Multi 2"
    Case 3
    Lev.NumberStyle = wdListNumberStyleArabic
    Lev.NumberFormat = "%3."
    Lev.LinkedStyle = "List Multi 3"
    Case 4
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%4)"
    Lev.LinkedStyle = "" 'stops linking of a style to this level
    Case 5
    Lev.NumberStyle = wdListNumberStyleLowercaseRoman
    Lev.NumberFormat = "%5)"
    Lev.LinkedStyle = "" 'stops linking of a style to this level
    Case 6
    Lev.NumberStyle = wdListNumberStyleArabic
    Lev.NumberFormat = "%6)"
    Lev.LinkedStyle = "" 'stops linking of a style to this level
    Case 7
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%6.%7)"
    Lev.LinkedStyle = "" 'stops linking of a style to this level
    Case 8
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%6.%7.%8)"
    Lev.LinkedStyle = "" 'stops linking of a style to this level
    Case 9
    Lev.NumberStyle = wdListNumberStyleLowercaseLetter
    Lev.NumberFormat = "%6.%7.%8.%9)"
    Lev.LinkedStyle = "" 'stops linking of a style to this level
    End Select
    iStartIndent = iStartIndent + iListStep
    Next Lev

    myListTemplate.Name = "List Multi"
    Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=myListTemplate, _
    ContinuePreviousList:=False, ApplyTo:=wdListApplyToWholeList
    Reset 'clears buffer
    End Sub
    [/codebox]

    Many thanks

  8. #8
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Janine

    The code I provided can be made to work fine in Word 2007 so that is not the problem BUT I neglected to set up all the preconditions that are necessary for a quick implementation. Sorry about that

    I see that I didn't define the variables (which were global in the original) and you have had a guess at them. Two of those guesses were the source of your compile problems. I have amended the code earlier in this thread to fix these problems and make the macro more likely to work in a new document (by changing the style applied to a built-in one).

    Try it again and let me know if you run into other problems.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  9. #9
    New Lounger
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='Andrew Lockton' post='766334' date='20-Mar-2009 10:28']Janine

    The code I provided can be made to work fine in Word 2007 so that is not the problem BUT I neglected to set up all the preconditions that are necessary for a quick implementation. Sorry about that

    I see that I didn't define the variables (which were global in the original) and you have had a guess at them. Two of those guesses were the source of your compile problems. I have amended the code earlier in this thread to fix these problems and make the macro more likely to work in a new document (by changing the style applied to a built-in one).

    Try it again and let me know if you run into other problems.[/quote]

Posting Permissions

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