![]() ![]() MsgBox "Cell doesn't contain a non-zero starting number." IStartNum = Val(Selection.Cells(1).Range.Text)įor J = RowNum + 1 To ActiveDocument.Tables(1).Rows.CountĪctiveDocument.Tables(1).Cell(J, ColNum).Range.Text = iStartNum If Selection.Information(wdWithInTable) Then Repeat steps 2 through 4 for each of the other cells where you want a number, but make sure you leave off the \r switch in these others.įinally, if you prefer to use a macro to insert numbers in a sequence of cells, you could use one similar to this:.With the insertion point still within field code, press Shift+F9.Here's an example of how the field code would appear if you wanted to start counting with the number 4: Inside the field braces, type SEQ followed by a space, then a name you want used for this particular sequence, then another space, then \r, then the number you want the sequence to start with.Press Ctrl+F9 to insert an empty set of field braces.Insert the insertion point at the place in the table where you want the first number.When entering data in the table and you get to the last column, press Tab and Word inserts a new row that is automatically numbered.Īnother powerful way to add your numbering is to use the SEQ field. ![]() (In other words, follow the steps above for the single cell in the row.)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |