I am working on a code that appends some data copied from excel and appended to a current table in a word document. The problem I am having is that my PasteAppendTable command is not working correctly. I have listed my code below:
Code:
Sub ChangeTable()
Dim rngParagraphs As Range
Set rngParagraphs = ActiveDocument.Range( _
Start:=ActiveDocument.Tables(3).Range.Start, _
End:=ActiveDocument.Tables(3).Range.End)
rngParagraphs.Style = "Table Columns 2"
rngParagraphs.Rows.Last.Select
Selection.InsertRowsBelow (1)
Selection.PasteAppendTable
rngParagraphs.Style = "Table Grid"
End Sub
I thought maybe I could move the cursor to the first cell of the new last row and that would fix things but I haven't been able to figure that out either. Any help is greatly appreciated!