Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Aug 2002
    Location
    Sierra Madre, California, USA
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shortcut to Customize Outline Numbered List (Word XP/2003)

    I create List Styles linked to heading levels. I want a quick way for my users to get to the Customize Outline Numbered List dialog box for the appropriate List Style.

    I'd like to create a macro so that when they are in Heading 2 and want to change it, they click on the macro - it figures out that heading 2 is linked to a List Style called "MyCustomNumbering," and then it opens the Customize Outline Numbered List dialog box for the List Style and NOT the Paragraph Style.

    Does anyone know if this can be done? I can't even figure out how to show the Customize Outline Numbered List dialog box.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shortcut to Customize Outline Numbered List (Word XP/2003)

    I can't find the Customize Outline Numbered List in the list of wdDialog constants. You may have to use SendKeys.

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut to Customize Outline Numbered List (Word XP/2003)

    <img src=/S/cop.gif border=0 alt=cop width=15 height=24> !! BEWARE OF THE TRAP!! <img src=/S/cop.gif border=0 alt=cop width=15 height=24>
    Never ever edit a list template by editing any but the top level style!

    You could move up to the previous outline level 1 paragraph from the same list template, and then show the dialog (with a bit of help from SendKeys as mentioned by Hans):<pre>Dim rngOld As Range
    Dim myLT As ListTemplate
    Dim rngOld As Range
    Dim nameStyle As String
    Dim i As Integer, iOldListLevel As Integer
    Dim strSendKeys As String
    Set rngOld = Selection.Range.Duplicate
    Selection.Collapse (wdCollapseStart)
    ' Move up while para is no list para:
    While Selection.Paragraphs(1).Range.ListParagraphs.Count <> 1
    Selection.Move Unit:=wdParagraph, Count:=-1
    Wend
    nameStyle = Selection.Paragraphs(1).Range.ListFormat.ListTempl ate.ListLevels(1).LinkedStyle
    iOldListLevel = Selection.Paragraphs(1).Range.ListFormat.ListLevel Number
    ' Move up to the next para using that style:
    Do While Selection.Paragraphs(1).Style.NameLocal <> nameStyle
    Selection.Move Unit:=wdParagraph, Count:=-1
    ' Exit sub if start of document is reached:
    If Selection.Start = 0 Then
    rngOld.Select
    Exit Sub
    End If
    Loop
    Application.EnableCancelKey = wdCancelDisabled
    strSendKeys = "{TAB}{ENTER}{TAB}{TAB}{TAB}"
    ' locate list level:
    For i = 1 To iOldListLevel - 1
    strSendKeys = strSendKeys & "{DOWN}"
    Next i
    SendKeys strSendKeys
    With Dialogs(wdDialogFormatBulletsAndNumbering)
    .DefaultTab = wdDialogFormatBulletsAndNumberingTabOutlineNumbere d
    .Show
    End With
    rngOld.Select
    </pre>

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  4. #4
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut to Customize Outline Numbered List (Word XP/2003)

    Hi Kris,

    Maybe I mis-read your post. Do you use an outline list template with styles linked to it (as I assumed), or are you really using List Styles?

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  5. #5
    Lounger
    Join Date
    Aug 2002
    Location
    Sierra Madre, California, USA
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut to Customize Outline Numbered List (Word XP/2003)

    Sorry for the delay in responding. I am really using List Styles. So what I've currently been doing is just going to Format... Bullets and Numbering, and it automatically takes me to the tab for the list styles. I'm then customizing it from there. As far as I can tell, it doesn't matter what level I'm in since it's modifying the List Style. Any thoughts on this anyone?

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

    Re: Shortcut to Customize Outline Numbered List (W

    I haven't used list styles although I have been using outline numbering for a very long time. I haven't been tempted down that track yet although I keep reminding myself to go exploring there one day.

    Have you already worked out how to show the list styles dialog with SendKeys.
    SendKeys "%L"
    Dialogs(397).Display
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    Lounger
    Join Date
    Aug 2002
    Location
    Sierra Madre, California, USA
    Posts
    46
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shortcut to Customize Outline Numbered List (W

    Here's what I've come up with (haven't done any error-trapping yet)

    With Application.Dialogs(wdDialogFormatBulletsAndNumber ing) (automatically goes to the List tab)

    SendKeys "%m" 'modify...
    SendKeys "%o" 'format...
    SendKeys "n" 'numbering....
    SendKeys "%t" 'customize...
    SendKeys "%m" 'displays "more" option
    .Show

    I'll need to do some testing and error-trapping, but it seems promising!
    I'll need to make sure that they're in a list style. Also if it's been re-routed through a computer with Word 2000 the list styles get stripped out, so I'll have to figure out how to put it back in.
    End With

Posting Permissions

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