Este exemplo irá copiar as células A1:A2
do Excel para o Word
Usando favoritos
Sub PopulateColumninWord()
Dim wdApp As Object
Set wdApp = GetObject(, "Word.Application")
Set wdDoc = wdApp.ActiveDocument
'Read in position of two bookmarks named START and END
Set rngStart = wdDoc.Bookmarks("Start").Range
Set rngEnd = wdDoc.Bookmarks("End").Range
'Copy range from Excel to Word
ThisWorkbook.Sheets(1).Range("A1:A2").Copy
wdDoc.Range(rngStart.End + 1, rngEnd.Start - 1).PasteAndFormat (22)
Set wdApp = Nothing
Set wdDoc = Nothing
End Sub
Usando tabelas no Word
Sub PopulateColumninWord()
Dim wdApp As Object
Set wdApp = GetObject(, "Word.Application")
Set wdDoc = wdApp.ActiveDocument
'Copy range from Excel to Word
ThisWorkbook.Sheets(1).Range("A1:A2").Copy
wdDoc.Range(wdDoc.Tables(1).Cell(1, 1).Range.Start, _
wdDoc.Tables(1).Cell(2, 1).Range.End).PasteAndFormat (22)
'Copy single cell from Excel to Word
ThisWorkbook.Sheets(1).Cells(1, 2).Copy
wdDoc.Tables(1).Cell(1, 2).Range.PasteAndFormat (22)
Set wdApp = Nothing
Set wdDoc = Nothing
End Sub