Solved

How to create bulleted list in word document using VB

Posted on 2004-08-13
5
567 Views
Last Modified: 2008-03-06
Hi All,

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

Regards,
Deepak
0
Comment
Question by:deepak_khopade
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
SNilsson earned 500 total points
ID: 11790849
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:
Selection.WholeStory
0
 

Author Comment

by:deepak_khopade
ID: 11829212
thanx yaar.

it works fine for me.
0
 
LVL 8

Expert Comment

by:SNilsson
ID: 11829579

Good to hear, how about an 'accept answer' then :)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Problem to setup 18 79
Visual xHarbour 1 76
Replace a tag with sed 2 42
count7 challenge 12 69
A short article about a problem I had getting the GPS LocationListener working.
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now