Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Kingwood, Texas, USA
    Posts
    49
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I define a bulleted style using VBA? (VBA/Word/2002 SP-1)

    I want to be able to modify a bulleted style using VBA. You'd think I could just record a macro that would do just that, but when I record said macro, even though the results of the actions I recorded look just fine in the document, when I run the macro I get hollow squares instead of bullets. In the recorded macro there's a section that starts,"With ListGalleries(wdBulletGallery).ListTemplates(2).Li stLevels(1)" that contains the line ".NumberFormat = ChrW(61623)". I've changed this to ".NumberFormat = ChrW(2022)" [2022 is Unicode for bullet] to no avail. I still get hollow squares! Can anybody help?

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

    Re: How do I define a bulleted style using VBA? (VBA/Word/2002 SP-1)

    Are you sure the list level applied is 1 and not some lower level? This is probably in the last line of the recorded macro.

    I would also check the typeface applied to the character. The square box is possibly coming out of a font issue where that character does not exist in the typeface chosen for the bullet. 2022 may only be Unicode for a bullet in one particular typeface and not in another.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: How do I define a bulleted style using VBA? (VBA/Word/2002 SP-1)

    Hi margot,
    Following up on Andrew's post, try character 0149. That's the key code for a bullet in almost every font.
    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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