Reputation: 3311
In the below code: mWrdTbl is an object containing the table of the 1st word document adWrdTbl is an object containing the table of the 2nd word document (both documents are opened)
mWrdTbl.Rows(R).Range.Copy
adWrdTbl.Range.PasteAppendTable
The code works but the row is pasted at the top of the table (I need it at the end)
Edit:
I found a workaround (but I'm not satisfied):
mWrdTbl.Rows(R).Range.Copy
adWrdTbl.Rows.Add
adWrdTbl.Rows.Add
adWrdTbl.Rows(adWrdTbl.Rows.Count - 1).Range.PasteAppendTable
adWrdTbl.Rows(adWrdTbl.Rows.Count).Delete
adWrdTbl.Rows(adWrdTbl.Rows.Count).Delete
Upvotes: 0
Views: 666
Reputation: 4355
This works for me
Dim myRange As Word.Range
Set myRange = adWrdTbl.Range
myRange.Collapse direction:=wdCollapseEnd
myRange.FormattedText = mWrdTbl.Range.Rows(R).Range.FormattedText
Upvotes: 1