![]() |
#6
|
||||
|
||||
![]()
Since it's not apparent whether all your tables have exactly the same structure, the following macro works on the premise that you select the starting cell in whatever table you want to update, then run the macro. The checkbox will be added to all cells below the selected one in that cell's column.
Code:
Sub Demo() Application.ScreenUpdating = False Dim c As Long, i As Long, r As Long With Selection If .Information(wdWithInTable) = False Then Exit Sub c = .Cells(1).ColumnIndex: r = .Cells(1).RowIndex With .Tables(1).Range For i = 1 To .Cells.Count With .Cells(i) If .RowIndex >= r Then If .ColumnIndex = c Then With .Range .InsertBefore " " .Collapse wdCollapseStart .ContentControls.Add wdContentControlCheckBox, .Duplicate End With End If End If End With Next End With End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
insert at beginning, paste, table cell |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
NDnathan | Word Tables | 1 | 04-22-2019 07:07 PM |
![]() |
Kea | Word Tables | 1 | 09-24-2015 12:58 AM |
![]() |
a_gunslinger | PowerPoint | 1 | 04-18-2013 07:54 AM |
Losing rows when pasting split cells | Gitley | Word Tables | 1 | 01-15-2013 07:49 AM |
Word 2003 form fields and pasting multiple paragraphs. | mwmoron | Word | 1 | 12-07-2012 11:06 PM |