locked
Defining the paragraph format for Bullets / Numbering button RRS feed

  • Question

  • I'm trying to setup the templates for our Word 2010 rollout and am having a problem with setting the format for Bullets and Numbering

    I have setup a List Bullet and List Number style and added them to my Quick Styles gallery.  These styles both had the bullet / number in line with the left margin of the page.

    I would like these formats to be associated with the appropriate buttons on the toolbar, but it appears that this is not possible - am I mistaken?  The toolbar buttons for Bullets and Numbers both insert an indent to the format...


    Dan Kelly
    Wednesday, March 9, 2011 11:55 AM

Answers

  • You can use a pair of macros to intercept the built-in commands for those buttons:

    Sub FormatBulletDefault()
    Selection.Range.Style = wdStyleListBullet  'or specify some other style that you want
    End Sub

    Sub FormatNumberDefault()
    Selection.Range.Style = wdStyleListNumber  'or a different style
    End Sub

    Note that the above code won't help if users click the arrow on the button and specifically choose a list format.


    Stefan Blom, Microsoft Word MVP
    • Marked as answer by Sally Tang Monday, March 21, 2011 9:23 AM
    Sunday, March 20, 2011 1:55 PM

All replies

  • Hi,

    You may use macro to create such button. If you have questions about how to do this, you can post your issue on word developer forum.

    http://social.msdn.microsoft.com/Forums/is/worddev/threads

     

    Thursday, March 10, 2011 8:09 AM
  • I know how to create a button to do this - I just find it insane that the default buttons in Word cannot be tied to the styles.


    Dan Kelly
    Thursday, March 10, 2011 9:43 AM
  • You can use a pair of macros to intercept the built-in commands for those buttons:

    Sub FormatBulletDefault()
    Selection.Range.Style = wdStyleListBullet  'or specify some other style that you want
    End Sub

    Sub FormatNumberDefault()
    Selection.Range.Style = wdStyleListNumber  'or a different style
    End Sub

    Note that the above code won't help if users click the arrow on the button and specifically choose a list format.


    Stefan Blom, Microsoft Word MVP
    • Marked as answer by Sally Tang Monday, March 21, 2011 9:23 AM
    Sunday, March 20, 2011 1:55 PM