Link Excel Data to a Word Document with VBA
Question details
The user wants to use Excel VBA to insert a dynamically linked range into an existing Word document.

- Product
- Microsoft Excel and Microsoft Word
- Device & OS
- not provided
- Scenario
- An Excel macro needs to open an existing Word document and paste a range as linked data.
- Observed behavior
- Assigning a file path directly to a Word document object causes an Object Required error, and an ordinary paste does not create a dynamic link.
Save the Excel workbook and confirm the Word document path, worksheet name, and source range. Enable macros only if you trust the workbook and its code.
Open the Word document and paste the Excel range as a link
Use this method to correct the document object assignment and create a linked Excel object in Word.
A file path is a string, not a Word Document object. Documents.Open returns the object that the macro can use to paste content and save the document.
The example uses late binding, so it does not require adding a Word object library reference. It appends the linked range to the end of the document.
In Excel, press Alt+F11, select Insert > Module, and paste the following macro into the module: Sub LinkRangeToWord() Dim wdApp As Object Dim wdDoc As Object Dim wdRange As Object Dim docPath As String docPath = "C:\Path\Report.docx" Set wdApp = CreateObject("Word.Application") wdApp.Visible = True Set wdDoc = wdApp.Documents.Open(docPath) ThisWorkbook.Worksheets("Sheet1").Range("A1:D10").Copy Set wdRange = wdDoc.Content wdRange.Collapse 0 wdRange.PasteSpecial Link:=True, DataType:=0 wdDoc.Save End Sub
Replace C:\Path\Report.docx with the existing Word document's full path. Change Sheet1 and A1:D10 to the worksheet and range you want to link.
Place the cursor inside LinkRangeToWord and press F5 in the VBA editor. The macro opens Word, appends the linked Excel range, and saves the document.
Change and save a value in the source Excel range. In Word, right-click the linked object and choose Update Link if it does not refresh immediately.

Work with Excel and Word files in WPS Office
WPS Office is a free, lightweight alternative with familiar spreadsheet and document interfaces. Open and edit common Microsoft Office formats to make migration easier; the Microsoft Word VBA automation and linked-object workflow described above may not work the same way in WPS.

Frequently Asked Questions
Why can't I assign the file path directly to the document variable?
A path is text, while the document variable needs a Word Document object. Use Set wdDoc = wdApp.Documents.Open(docPath) to open the file and assign the returned object.
How do I paste the Excel range as a link instead of a static copy?
Copy the range in Excel, then call PasteSpecial on a Word range with Link:=True. The example also uses DataType:=0 to paste a linked OLE object.
Why isn't the linked data updating in Word?
Save changes in the source Excel workbook, then right-click the linked object in Word and select Update Link. Check that the source workbook is still accessible and that Word has not blocked link updates.
Does the example overwrite existing Word content?
No. It uses wdDoc.Content and Collapse 0 to place the insertion point at the end of the document before pasting. Adjust the Word range in the macro if you need a different insertion point.




