0

I am basically looping through all the cells within all the tables of a given Word document. I want to be able to identify cells that contain ContentControlls. Is this possible?

At least in terms of text length, cells with only ContentControls appear to be empty (other than the normal two cell end characters)

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • What about: https://learn.microsoft.com/en-us/office/vba/api/word.range.contentcontrols#:~:text=Returns%20a%20ContentControls%20collection%20that%20represents%20the%20content%20controls%20contained%20within%20a%20range – Tim Williams Jul 27 '23 at 22:34

1 Answers1

1

For example:

Dim c As Cell

Set c = ActiveDocument.tables(1).Cell(3,3)
Debug.Print c.Range.ContentControls.Count
Tim Williams
  • 154,628
  • 8
  • 97
  • 125