Bulleting a table programmatically

D

dyowee

Good day!
I'm trying to create a bulleted/numbered list programmatically in Word. The
list can either have text, image, or table. How can you apply a bullet/number
to a table as a whole? Using the Range of the table, then calling
ApplyBulletDefault method on the ListFormat property would apply bullets on
all the cells of the table. How can this be done programmatically?

Thank you very much.
 
J

Jonathan West

dyowee said:
Good day!
I'm trying to create a bulleted/numbered list programmatically in Word.
The
list can either have text, image, or table. How can you apply a
bullet/number
to a table as a whole? Using the Range of the table, then calling
ApplyBulletDefault method on the ListFormat property would apply bullets
on
all the cells of the table. How can this be done programmatically?

Thank you very much.

I would recommend you define a paragraph style which has numbering or
bullets defined for it, and then apply that style to the table.
 
J

Jonathan West

dyowee said:
Thank you very much for your response. But any code sample/snippet for
this?

Build the style by hand in the template. Then all you need do is apply it
something like this

oTable.Range.Style = "Bullet List 1"

where oTable is an object variable pointing to your table.
 
D

dyowee

My apologies, but what do you mean by style by hand in the template?

Thank you very much.
 
J

Jonathan West

dyowee said:
I've tried this sir, but it still applies a bullet to each item in each
cell...

I thought that was wat you wanted.

Where precisely do you want the bullet(s)?
 
D

dyowee

Actually, I want the effect of bulleting the table as a whole, not each and
every cell sir. Is that possible?
 
J

Jonathan West

dyowee said:
Actually, I want the effect of bulleting the table as a whole, not each
and
every cell sir. Is that possible?

If I understand you, you want to move the whole table to the right a bit and
have a bullet showing somewhere to the left of it. Do I have that right?

If so, set the table to be "floating". Use the Table Properties dialog to
move it round. Then insert a graphic of the appropriate kind of bullet where
you want it. Record a macro while you do all this, and refine the code that
is egenerated as a result, until it is doing exactly what you want.
 

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