By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,991 Members | 1,737 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,991 IT Pros & Developers. It's quick & easy.

MS-Word: Special auto-numbering using vba

P: 2
I have a word document that contains a table. The table has 2 columns and hundreds of rows.
I want to number the items in the table in the following way:
In the first column, each cell will contain one item that will be numbered as the regular ms-word auto-numbering goes.
In the second column, each item will be outline numbered sequentially, with the number in the column from left leading to it.
For example, in the left column the single item in the cell is numbered as "1." - in the next cell to this cell from right, I want each item\row to be auto-numbered as: "1.1", "1.2", "1.3", "1.4" etc. in the next row, the left cell is numbered as "2.", and in the right cell, the items will be numbered as: "2.1", "2.2", "2.3", "2.4", "2.5" etc.

How to do this?

Thanks
Dec 11 '06 #1
Share this Question
Share on Google+
6 Replies


Coldfire
100+
P: 289
I have a word document that contains a table. The table has 2 columns and hundreds of rows.
I want to number the items in the table in the following way:
In the first column, each cell will contain one item that will be numbered as the regular ms-word auto-numbering goes.
In the second column, each item will be outline numbered sequentially, with the number in the column from left leading to it.
For example, in the left column the single item in the cell is numbered as "1." - in the next cell to this cell from right, I want each item\row to be auto-numbered as: "1.1", "1.2", "1.3", "1.4" etc. in the next row, the left cell is numbered as "2.", and in the right cell, the items will be numbered as: "2.1", "2.2", "2.3", "2.4", "2.5" etc.

How to do this?

Thanks
there exists a solution but still u have to work through it.....well i will tell u wht i have tried:
i made the two columns as

col1 | col2
-------------------------------------------
1 a | a
| b
| c
| d
| c
-------------------------------------------
2 b | a
| b
........
........

Now what i have done is selected the whole cell 1 and col 2's enteries
as
"a
b
c
d
c"
Numbered them > double click the first number (to modify the numbering scheme) > Goto Tab "Outlined Number" and Click Any scheme > press Customize > Delete everything on "Number Format" and then choose "Number Style" as 1,2,3 .....atonce the "Number Format" will display 1 in a gray shade > Now goto "Number Format" and press Home and type 1. (1 dot) that will become 1.1(with the second 1 shaded) >
Select Level as 2 on the left > Delete everything on "Number Format" and then choose "Number Style" as 1,2,3 .....atonce the "Number Format" will display 1 in a gray shade > Now goto "Number Format" and press Home and type 1. (1 dot) that will become 1.1(with the second 1 shaded)

Select Level as 3 on the left > Delete everything on "Number Format" and then choose "Number Style" as 1,2,3 .....atonce the "Number Format" will display 1 in a gray shade > Now goto "Number Format" and press Home and type 1. (1 dot) that will become 1.1(with the second 1 shaded)
well this is enough now press OK and see the result


To apply on further cells u have to do the same above steps


hope that helps
Dec 11 '06 #2

Coldfire
100+
P: 289


To apply on further cells u have to do the same above steps


hope that helps
to apply further ....u can just copy the numbering properties and paste on the next cell enteries.....and make some changes as per required (by changing the numbering index "Start at" by 1 and then periodically changing the first index by 2 i.e.
2.1 (Level 1)
2.1 (Level 2)
2.1 (Level 3)

....u get the point ;)
Dec 11 '06 #3

Expert 5K+
P: 8,434
Please ignore my post here. I just wanted to add this thread to my "subscribed" list so I can keep an eye on how it goes. I'm hoping to learn something myself about working with tables in VBA.
Dec 11 '06 #4

Coldfire
100+
P: 289
I have a word document that contains a table. The table has 2 columns and hundreds of rows.
I want to number the items in the table in the following way:
In the first column, each cell will contain one item that will be numbered as the regular ms-word auto-numbering goes.
In the second column, each item will be outline numbered sequentially, with the number in the column from left leading to it.
For example, in the left column the single item in the cell is numbered as "1." - in the next cell to this cell from right, I want each item\row to be auto-numbered as: "1.1", "1.2", "1.3", "1.4" etc. in the next row, the left cell is numbered as "2.", and in the right cell, the items will be numbered as: "2.1", "2.2", "2.3", "2.4", "2.5" etc.

How to do this?

Thanks
well ...the solution i gave has nothing todo with vba..sorry !!!
Dec 12 '06 #5

Expert 5K+
P: 8,434
well ...the solution i gave has nothing todo with vba..sorry !!!
Oops! :) I hadn't gone through the messages in detail as yet.

I may still learn something about Word, anyway.
Dec 12 '06 #6

P: 2
Thanks a lot,
I would like to make sure that I understand, In your example, the auto-numbering is only on the second column (col 2) - the numbering in col 1 are entered manually?
If yes - Is there a way that both columns will be auto-numbered separately?
If no (In your example both columns are auto-numbered) - can you please clarify how?

Thanks
Dec 18 '06 #7

Post your reply

Sign in to post your reply or Sign up for a free account.