View Single Post
 
Old 03-26-2021, 03:37 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For example:
Code:
'The following code conditionally adds a new row, with content controls, to the designated tables.
Dim i As Long, j As Long, t As Long, Prot As Variant
Const Pwd As String = "" 'Insert password (if any) here
With CCtrl
  'Check that the Content Control is within our table.
  t = ActiveDocument.Range(0, CCtrl.Range.Start).Tables.Count
  Select Case t
    Case 3, 4
    Case Else: Exit Sub
  End Select
  'Get the number of ContentControls in the table
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote