View Single Post
 
Old 06-07-2021, 03:53 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

I would use a consistent Tag value in each CC that needs to be wiped by the macro. For example, set the Tag property to "Annual" for the plain text CCs you want to wipe.

The macro that then wipes those ones (at its simplest) would be
Code:
Sub DeciduousCCs()
  Dim aCC As ContentControl
  For Each aCC In ActiveDocument.SelectContentControlsByTag("Annual")
    aCC.Range.Text = ""
  Next aCC
End Sub
You might need to complicate this if it doesn't work with the CC types in your document.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote