I would like to modify this code I am using in a word document so that it updates its table columns with the currently selected row in excel: Sub AppendCellValuesToTable()
'Get a reference to the Excel Application object
Set xlApp = GetObject(, "Excel.Application")

'Get a reference to the active Workbook object
Set xlWB = xlApp.ActiveWorkbook

'Get the values of cells A1, B1, C1, and D1 from the active Excel sheet using the Excel object model
cellA1 = xlApp.ActiveWorkbook.ActiveSheet.Range("A10").Value
cellB1 = xlApp.ActiveWorkbook.ActiveSheet.Range("B10").Value
cellA2 = xlApp.ActiveWorkbook.ActiveSheet.Range("D10").Value
cellB2 = xlApp.ActiveWorkbook.ActiveSheet.Range("E10").Value
cellA3 = xlApp.ActiveWorkbook.ActiveSheet.Range("C10").Value
cellB3 = xlApp.ActiveWorkbook.ActiveSheet.Range("M10").Value
cellA4 = xlApp.ActiveWorkbook.ActiveSheet.Range("L10").Value
cellB4 = xlApp.ActiveWorkbook.ActiveSheet.Range("F10").Value
cellA5 = xlApp.ActiveWorkbook.ActiveSheet.Range("G10").Value
'cellB5 = xlApp.ActiveWorkbook.ActiveSheet.Range("I10").Value
cellA6 = xlApp.ActiveWorkbook.ActiveSheet.Range("H10").Value
'cellB6 = xlApp.ActiveWorkbook.ActiveSheet.Range("J10").Value

'Get the Word table and append the values to the corresponding cells
With ActiveDocument.Tables(1)
'Row 1
.Cell(1, 1).Range.Text = cellA1
.Cell(1, 2).Range.Text = cellB1

'Row 2
.Cell(2, 1).Range.Text = cellA2
.Cell(2, 2).Range.Text = cellB2

'Row 3
.Cell(3, 1).Range.Text = cellA3
.Cell(3, 2).Range.Text = cellB3

'Row 4
.Cell(4, 1).Range.Text = cellA4
.Cell(4, 2).Range.Text = cellB4

'Row 5
.Cell(5, 1).Range.Text = cellA5
'.Cell(5, 2).Range.Text = cellB5

'Row 6
.Cell(6, 1).Range.Text = cellA6
'.Cell(6, 2).Range.Text = cellB6

End With

End Sub