Thread: Checkbox code
View Single Post
 
Old 05-19-2020, 01:41 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If you provided the existing code along with a sample doc it would be easy enough to provide you the relevant code modifications. In the absence of that, your code could cycle through a collection of Content Controls and create a function that processes each ticked CC based on the page it resides on.
Code:
Sub ProcessPages()
  Dim aCC As ContentControl
  For Each aCC In ActiveDocument.ContentControls
    If aCC.Checked Then
      MsgBox "This page has a checked CC: " & aCC.Range.Information(wdActiveEndPageNumber)
    End If
  Next aCC
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote