• Number format as bullet in a multilevel list (Word 2003)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Number format as bullet in a multilevel list (Word 2003)

    Author
    Topic
    #435960

    I have a macro that sets up a bullet style. The following is the portion of the code that sets the NumberFormat for that macro:

    With ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1)
    .NumberFormat = “

    Viewing 0 reply threads
    Author
    Replies
    • #1032121

      I tried recording a Macro to set this bullet, and it gave
      .NumberFormat = ChrW(61623)

      StuartR

      • #1032125

        I know I should know this, how did you find the number?

        It worked, but it put in the wrong bullet.

        I know there is a simple macro/function that would give me the number I needed for the ChrW based on a selection. Could you please provide it?

        I can get the symbol from the Symbols dialog, but I need the number.

        Thanks!!
        Troy

        • #1032128

          Select the character.
          Activate the Visual Basic Editor (Alt+F11)
          Activate the Immediate window (Ctrl+G)
          Type ? AscW(Selection) and press Enter

          • #1032137

            When I ran that command with the bullet I wanted selected, it gave me 8226.

            However, when I put that in the macro, it gave me those generic squares again.

            Let me attach what I have and maybe you can see where I’m missing it.

            Thanks!!
            Troy

            • #1032138

              I hope someone else can help – I cannot get my head around code for list levels etc. sad

            • #1032142

              Is the number in a font face/character set that has that character?

            • #1032209

              1. If you click the Insert menu and then click Symbols . The Symbol dialog appears.
              2. In the Symbols tab, select Times New Roman in the Font list.
              3. In the Subset list, click General Punctuation .

              The bullet I want is just to the left of the ellipse (…).

              Hope that helps!! Thanks for your help!!
              Troy

            • #1032211

              The Insert Symbol dialog show that this character is Chr(149), or if you prefer unicode, ChrW(&H2022)
              Does that help?

            • #1032268

              (Edited by TroyWells on 07-Oct-06 22:01. )

              EDIT: After restarting Word, the ChrW(61623) solution no longer works. However, the ChrW(8226) option that wasn’t working now is as well as Chr(149) with some adjustment to the size.

              Could this have anything to do with whatever solutions were made previously in the Symbols dialog box? I know it shouldn’t, but I had spent time looking through this dialog box to find the symbol I wanted. Then I rebooted the system and started without making any selections and now certain options work and some do not. I am mystified.

              Troy
              ————————–
              After futher digging, I went back to the second post in this string from StuartR where he gave

              .NumberFormat = ChrW(61623)

              as a possible solution. This, at least showed up as a bullet, not a square.

              When I chose that option and then when to Format > Bullets and Numbering, it appears this is using the Symbol font. If I try to change the font to TImes New Roman, or any other font, all I get is squares.

              Theory, is it possible, for some really strange reason, that multi-level lists only except items from the Symbol font where as single-level lists or single-level bullets accept any font?

              I was able to make this work for me. It seems that if I specify a Font size of 8 for the bullet in the Symbol font

              ( ChrW(61623)  )

              it looks exactly like the TImes New Roman bullet at size 11 (or at least close enough that I can’t tell the difference).

              That being said, I’d appreciate confirmation on my theory about multi-level lists only using things from the Symbol font.

              Thanks again for all the help!!
              Troy

            • #1032301

              Well, I can shoot that theory down. You can apply any font to any outline level list item. The following macro happens to use Symbol but can be changed to apply any font name.

              '============================================================
              Sub ListBullet()
              ' Macro created 1/12/99 by Chrysalis Design Pty Ltd
              ' Resets the outline levels for the list bullet styles
              
              'Apply the List Bullet Style
              Selection.Style = ActiveDocument.Styles("List Bullet")
              
              'Set the starting indent and the step in for each level
              ' Units are in centimetres
              iStartIndent = TextIndent
              Set myListTemplate = ListGalleries(wdOutlineNumberGallery).ListTemplates(5)
              
              'Define the multi level list for bullets
              For Each lev In myListTemplate.ListLevels
                lev.NumberFormat = ChrW(61623)  'overridden on Lev 2 & 3
                lev.NumberStyle = wdListNumberStyleBullet
                lev.Alignment = wdListLevelAlignLeft
                lev.NumberPosition = iStartIndent
                lev.TrailingCharacter = wdTrailingTab
                lev.TabPosition = iStartIndent + CentimetersToPoints(iListStep)
                lev.TextPosition = iStartIndent + CentimetersToPoints(iListStep)
                lev.Font.Size = 11
                lev.Font.Name = "Symbol"
                lev.LinkedStyle = ""  'no style linked (overridden in first three levels)
              
                Select Case lev.Index
                Case 1
                    lev.LinkedStyle = "List Bullet"
                Case 2
                    lev.LinkedStyle = "List Bullet 2"
                    lev.NumberFormat = ChrW(61485)
                Case 3
                    lev.LinkedStyle = "List Bullet 3"
                    lev.NumberFormat = ChrW(61664)
                End Select
                iStartIndent = iStartIndent + CentimetersToPoints(iListStep)
              Next lev
                
              myListTemplate.Name = "List Bullet"
              Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=myListTemplate, _
                ContinuePreviousList:=False, ApplyTo:=wdListApplyToWholeList
              
              End Sub
    Viewing 0 reply threads
    Reply To: Number format as bullet in a multilevel list (Word 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: