다음 표가 있습니다.반복 섹션 내용 컨트롤 안에 중첩 된 개별 콘트롤 주소 지정
각 셀은 개별적 평문 컨텍스트 제어를 나타낸다. 전체 행은 "ENTRY"라는 태그가 붙은 반복 섹션 컨텍스트 제어 ("RSCC")로 래핑됩니다. 아시다시피,이 같은 행을 추가 할 수 있습니다
이Sub MACRO1()
'
' MACRO1 Macro
'
Dim anchor_cc As ContentControl
Set anchor_cc = ActiveDocument.SelectContentControlsByTag("ENTRY").Item(1)
' Add one more row
total = 1
For counter = 1 To total
With anchor_cc
.AllowInsertDeleteSection = True
.RepeatingSectionItems(1).InsertItemAfter
End With
Next counter
End Sub
나는 또한이 같은 INDIVIDUAL RSCC를 해결할 수있는 출력합니다 대화 상자에서 전체 행의 텍스트 내용 :
Sub MACRO2()
Dim anchor_cc As ContentControl
Set anchor_cc = ActiveDocument.SelectContentControlsByTag("ENTRY").Item(1)
With anchor_cc
For counter = 1 To .RepeatingSectionItems.Count
MsgBox (.RepeatingSectionItems(counter).Range)
Next counter
End With
End Sub
해당 RSCC의 개별 셀을 어떻게 처리합니까? 예를 들어 첫 번째 행의 첫 번째 셀을 처리하려고한다고 가정 해 봅시다. 첫 번째 행을 처리하기는 쉽습니다. 난 그냥 즉 1-.RepeatingSectionItems
지수, 내가 그 행의 첫 번째 셀에 액세스하려면 어떻게
.RepeatingSectionItems(1)
을 설정할 수 있습니까? 또는 번째로 세포입니까? 셀은 개별 텍스트 텍스트 컨텍스트 컨트롤임을 기억하십시오. 그 대답이 전혀 바뀌는 지 모르겠습니다.