How to create bulleted list in word document using VB

Hi All,

I want to create a bulleted list in word document using VBA Code. Can anybody help me out?

Who is Participating?
SNilssonConnect With a Mentor Commented:
First you need to select where your list should start, can be done with a bookmark for example.

Then you need choose how many rows down you need to be bulleted.

Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend
(Count:=3 will select 3 rows as an example)

Then you need to apply the bullets:
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:=ListGalleries(wdBulletGallery).ListTemplates(1), ContinuePreviousList:=False, ApplyTo:=wdListApplyToWholeList, DefaultListBehavior:=wdWord9ListBehavior

(Beware of wordwrap above it's supposed to be on one line)

To remove the bullets from a selection you can use this:
Selection.Range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph

If you need to bullet everything do this befor applying the bullet list:
deepak_khopadeAuthor Commented:
thanx yaar.

it works fine for me.

Good to hear, how about an 'accept answer' then :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.