View Single Post
 
Old 02-02-2018, 04:10 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

Rather than using the VBA code listed in the "Advanced Custom Mapping" section, you might want to read a little further on and go to the 'Content Control Tools' page and download the addin there.

A simpler alternative would be to use a ContentControlOnExit macro in the 'ThisDocument' code module of either the document or its template, coded along the lines of:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
If CCtrl.Title <> "Parent" Then Exit Sub
With CCtrl
  If .ShowingPlaceholderText = False Then
    ActiveDocument.SelectContentControlsByTitle("Child")(1).Range.Text = .Range.Text
  Else
    ActiveDocument.SelectContentControlsByTitle("Child")(1).Range.Text = "XXXX"
  End If
End With
End Sub
where 'Parent' is the title of the Content Control you type in and 'Child' is the title of the Content Control the typed string is to be replicated in.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote