英文:
Finding content controls within Word table cells
问题
我基本上正在遍历给定的Word文档中所有表格中的所有单元格。我希望能够识别包含ContentControls的单元格。这可能吗?
至少在文本长度方面,只包含ContentControls的单元格似乎为空(除了正常的两个单元格结束字符)。
英文:
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)
答案1
得分: 1
例如:
Dim c As Cell
Set c = ActiveDocument.tables(1).Cell(3,3)
Debug.Print c.Range.ContentControls.Count
英文:
For example:
Dim c As Cell
Set c = ActiveDocument.tables(1).Cell(3,3)
Debug.Print c.Range.ContentControls.Count
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论