Change bullet colour in a document

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Change bullet colour in a document

Post by Robie »

Is it possible to change the colours of the bullet in a document in a macro? 6 different colours to be pricise. All paragraphs with bullet settings will be changed to the selected colour.

I have three levels of bullets and need to change the colours as required by the people in power (this is similar to my changing the bullet colours in PP presentation, which works wonderfully well).

EDIT: Am I asking stupid question perhaps? Should this be even considered? BTW: The docs in question will be about one-three pages in length only (so the content will not be that huge).
Last edited by Robie on 23 Mar 2011, 12:47, edited 1 time in total.

User avatar
StuartR
Administrator
Posts: 12606
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Change bullet colour in a document

Post by StuartR »

Do you use styles to apply the bullets, or do you click the bullets button on the toolbar/ribbon?
StuartR


Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Change bullet colour in a document

Post by Robie »

StuartR wrote:Do you use styles to apply the bullets, or do you click the bullets button on the toolbar/ribbon?
I would love sers to use the styles (I have defined them in the template & recommend them to the users ) but in practice I find that some use the styles and other use the bullet buttons on the toolbar/ribbon. Perhaps, there is a way of using the defined styles when the user clicks the toolbar/ribbon button?

User avatar
HansV
Administrator
Posts: 78489
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Change bullet colour in a document

Post by HansV »

This is for Word 2003, it'll be slightly different for Word 2007 or later.

If you format directly:
- Select one or more bulleted paragraphs
- Select Format | Bullets and Numbering...
- Click Customize...
- Click Font...
- Select a colour from the Font color dropdown.
- Click OK until you're back in Word.

If you apply styles: create a style for each bullet colour.
In the Modify Style dialog, click Format | Numbering... and proceed as above.
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Change bullet colour in a document

Post by Robie »

HansV wrote:This is for Word 2003, it'll be slightly different for Word 2007 or later.

If you format directly:
- Select one or more bulleted paragraphs
- Select Format | Bullets and Numbering...
- Click Customize...
- Click Font...
- Select a colour from the Font color dropdown.
- Click OK until you're back in Word.

If you apply styles: create a style for each bullet colour.
In the Modify Style dialog, click Format | Numbering... and proceed as above.
Thanks Hans. I am looking to do this in a macro. I created a macro using your method above but it obviously changes it for the selected paragraph. How do I do it for all 'bulleted' paragraphs?

User avatar
HansV
Administrator
Posts: 78489
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Change bullet colour in a document

Post by HansV »

Something like this?

Code: Select all

Sub ColourBullets(lngColour As Long)
  Dim par As Paragraph
  For Each par In ActiveDocument.ListParagraphs
    If par.Range.ListFormat.ListType = wdListBullet Then
      par.Range.ListFormat.ListTemplate.ListLevels(1).Font.Color = lngColour
    End If
  Next par
End Sub
Call from your macro as, for example,

ColourBullets wdColorAqua

or

ColourBullets RGB(224, 0, 64)
Best wishes,
Hans

Robie
5StarLounger
Posts: 656
Joined: 18 Feb 2010, 14:26

Re: Change bullet colour in a document

Post by Robie »

HansV wrote:Something like this?

Code: Select all

Sub ColourBullets(lngColour As Long)
  Dim par As Paragraph
  For Each par In ActiveDocument.ListParagraphs
    If par.Range.ListFormat.ListType = wdListBullet Then
      par.Range.ListFormat.ListTemplate.ListLevels(1).Font.Color = lngColour
    End If
  Next par
End Sub
Call from your macro as, for example,

ColourBullets wdColorAqua

or

ColourBullets RGB(224, 0, 64)
Thanks Hans. That works beautifully.