0
複数のテーブルを選択してテキストボックスオブジェクトに基づいて文字列を入力するMS WordのVBAコードが必要です。これを行うコードを書いたことがありますが、多数のテーブルを選択すると繰り返します。Word vba multiple table selection
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
このコードを組み込む簡単な方法はありますか?