View Single Post
 
Old 09-27-2018, 09:28 AM
therexjones therexjones is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2018
Posts: 6
therexjones is on a distinguished road
Default

Unfortunately, I can't seem to get this code to do anything.

Quote:
Originally Posted by macropod View Post
It seems to me you could manage any number of such content controls via code like:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument.SelectContentControlsByTitle(CCtrl.Title)
  For i = 2 To .Count
    With .Item(i)
      .LockContents = False
      .Range.Text = CCtrl.Range.Text
      .LockContents = True
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
Reply With Quote