get the bullet font and style from a list

C

Christosr

Hi there,

I have a word document that has 1 bullet list.
The list is already formated with a font and a bullet character.

I want to write a script to get these properties from the list.
Anyone has an idea how?

(The list object does not have the font or picture property)
 
S

Shauna Kelly

Hi Christosr

What you're seeking depends on how the bullet font and style came to exist.

If the bullets are coming from the underlying paragraph style (which is the
best way to apply bullets in Word), then you need to explore (eg)
ActiveDocument.Styles("List Bullet").ListTemplate.ListLevels.Item(1).Font,
..NumberFormat, .NumberStyle etc.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
H

Helmut Weber

Hi,

often, I don't think always,
this one may be helpful, too:

With ActiveDocument.ListParagraphs(1).Range
MsgBox .ListFormat.ListTemplate.ListLevels(1).Font.Name
MsgBox AscW(.ListFormat.ListString) + 4096
End With
 
C

Christosr

Due to the help of both of u,
i think this fits me fine.

xdocument.lists(1).Range.ListFormat.ListTemplate.ListLevels.Item(1).Font.name

This code gets the font name of the bullet of the requested list.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top