0
내가 선택한 여러 테이블을 선택하고 텍스트 상자 개체를 기반으로 문자열을 입력하는 MS Word 용 VBA 코드가 필요합니다. 이 작업을 수행하는 코드를 작성했지만 많은 수의 테이블을 선택하면 반복적으로 나타납니다.Word vba 다중 테이블 선택
Private Sub Claim_Change()
Dim j As Table
Set j = ActiveDocument.Tables(2)
Dim k As Table
Set k = ActiveDocument.Tables(3)
'Input claim
j.Select
Selection.Delete
With j
.Cell(1, 1).Range.InsertAfter "Claim #: " & Claim
.Cell(1, 2).Range.Text = Format(Date, "MMMM DD, YYYY ")
.Columns.AutoFit
End With
k.Select
Selection.Delete
With k
.Cell(1, 1).Range.InsertAfter "Claim #: " & Claim
.Cell(1, 2).Range.Text = Format(Date, "MMMM DD, YYYY ")
.Columns.AutoFit
End With
Claim.Select
End Sub
이 코드를 추가하는 더 간단한 방법이 있습니까? 더 쉽게 처리 할 수