Thread: [Solved] xml error .docm
View Single Post
 
Old 04-16-2018, 08:03 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,363
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 that you'd need to employ a ContentControlOnExit in the ThisDocument module of the document or its template, coded along the lines of:
Code:
Private Sub Document_ContentControlOnExit(ByVal CCtrl As ContentControl, Cancel As Boolean)
Select Case CCtrl.Title
  Case "MyCheck"
    With ActiveDocument.SelectContentControlsByTitle("MyCheck")
      If CCtrl.Tag = "Yes" Then
        .Item(2).Checked = Not CCtrl.Checked
      ElseIf CCtrl.Tag = "No" Then
        .Item(1).Checked = Not CCtrl.Checked
      End If
    End With
End Select
End Sub
Where the pair of checkbox content controls both have the Title 'MyCheck' and one of the pair has the Tag 'Yes' whilst the other has the Tag 'No'.

See attached.
Attached Files
File Type: docm Checkboxes.docm (31.0 KB, 11 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote