View Single Post
 
Old 03-17-2017, 09:01 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Using the document in the second link as an example, what I'd suggest for the replication is to have a text content control titled:
• 'Client' anywhere you want the client name replicated; and
• 'ClientDetails' anywhere you want the client details replicated,
coupled with the ContentControlOnExit macro re-coded as:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Application.ScreenUpdating = False
Dim i As Long, StrDetails As String
With CCtrl
  If .Title = "Client" Then
    If .Type <> wdContentControlDropdownList Then Exit Sub
    For i = 1 To .DropdownListEntries.Count
      If .DropdownListEntries(i).Text = .Range.Text Then
        StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11))
        Exit For
      End If
    Next
    With ActiveDocument.SelectContentControlsByTitle("Client")
      For i = 2 To .Count
        If CCtrl.Range.Text = CCtrl.PlaceholderText Then
          .Item(i).Range.Text = ""
        Else
          .Item(i).Range.Text = CCtrl.Range.Text
        End If
      Next
    End With
    With ActiveDocument.SelectContentControlsByTitle("ClientDetails")
      For i = 1 To .Count
        .Item(i).Range.Text = StrDetails
      Next
    End With
  End If
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote