Solved

How to create bulleted list in word document using VB

Posted on 2004-08-13
5
616 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 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

A short article about problems I had with the new location API and permissions in Marshmallow
Make the most of your online learning experience.
Six Sigma Control Plans
Starting up a Project

718 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