VBA & Macro Problems

Link Excel Data to a Word Document with VBA

Algirdas JasaitisAlgirdas Jasaitis Nov 25, 2026 868 views

Question details

The user wants to use Excel VBA to insert a dynamically linked range into an existing Word document.

Link Excel Data to a Word Document with VBA
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the VBA editor

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

2
Set the source and destination

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.

3
Run the macro

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.

4
Test the link

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.

Open the Word document and paste the Excel range as a link
Keep the source workbook accessible: The link depends on the saved Excel workbook remaining available at its linked location. Word's link-update settings and security prompts can affect when the displayed data refreshes.
Free Microsoft Office alternative

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.

Open and edit Excel XLSX and Word DOCX filesWork with spreadsheets and reports in a familiar interfaceUse a free, lightweight office suite for everyday document tasksMove existing Office files into WPS without changing formats first
QA img-9

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.