![]() |
|
|
|
#1
|
||||
|
||||
|
You don't really need a macro for this. Apply the List Number style to the headings. If your document is typical the following will do it. Code:
Sub AddNumStyle()
Dim oPara As Range
Dim oTable As Table
For Each oTable In ActiveDocument.Tables
Set oPara = oTable.Range
oPara.Collapse 1
oPara.Start = oPara.Start - 2
oPara.Collapse 1
oPara.End = oPara.Paragraphs(1).Range.End
oPara.Style = "List Number"
Next oTable
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#2
|
|||
|
|||
|
Thanks... The Macro worked..
I need an aditional change for the same ,need to add an blank line after each table. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to provide different formatting in a caption?
|
bantu | Word | 2 | 06-28-2014 11:25 PM |
| How to Create a Reference Style That Will Provide an author (date) citation | djwalsh | Word | 3 | 03-17-2014 05:28 AM |
| List Numbering position on right text | vanzilz | Word | 3 | 02-26-2014 12:45 AM |
| Numbering issue gap bettween 1.1 and text lower and higer numbering leave no gap | Turtlesrun | Word | 3 | 02-21-2014 04:48 AM |
| Using Numbering for Manually Numbered Text | gokceng | Word | 10 | 09-25-2013 05:02 PM |