View Single Post
 
Old 04-17-2015, 11:08 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

It is not the controls (which don't yet exist) that you want to cycle through, but the cells in the added row. e.g.

Code:
Sub addR()
Dim oTable As Table
Dim oCell As Cell
Dim oNewRow As Row
    'identify table
    Set oTable = ActiveDocument.Tables(1)
    ' Insert new row
    Set oNewRow = oTable.Rows.Add
    'identify the required cell in the new row
    Set oCell = oNewRow.Cells(1)        'the first cell in the row
    'add a date control to the cell
    ActiveDocument.ContentControls.Add wdContentControlDate, oCell.Range
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote