?
Solved

How to create bulleted list in word document using VB

Posted on 2004-08-13
5
Medium Priority
?
619 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
SNilsson earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Introduction to Processes
Starting up a Project

764 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