Others

Fix Word Runtime Error 4605 When Pasting from Excel

John WilsonJohn Wilson Nov 20, 2026 869 views

Question details

The user needs to prevent intermittent runtime error 4605 when an Excel-to-Word macro pastes Clipboard content during batch processing.

Fix Word Runtime Error 4605 When Pasting from Excel
Product
Microsoft Word and Microsoft Excel VBA automation
Device & OS
not provided
Scenario
A macro copies Excel content and pastes it into multiple Word documents.
Observed behavior
Word intermittently reports that the Clipboard is empty or invalid when the macro attempts to paste.
Before you start

Locate the Excel copy statement and the Word range or selection used for the paste in your VBA macro. Confirm that the source range contains the intended content and that the target Word document is open.

Solution 1Recommended

Retry the Word paste operation after allowing the Clipboard to settle

Use a bounded retry when error 4605 occurs intermittently because copied Excel content is not ready to paste.

The helper below retries error 4605 up to 20 times, allowing other events to run between attempts. It reports other errors immediately instead of hiding them.

1
Open the VBA editor

In Excel, press Alt+F11 and open the module containing the automation macro.

2
Add a paste helper

Add this procedure to the module: Private Sub PasteWithRetry(ByVal target As Object) Dim attempt As Long, errNum As Long Dim errText As String Dim started As Single, elapsed As Single For attempt = 1 To 20 On Error Resume Next Err.Clear target.Paste errNum = Err.Number errText = Err.Description On Error GoTo 0 If errNum = 0 Then Exit Sub If errNum <> 4605 Then Err.Raise errNum, "PasteWithRetry", errText started = Timer Do DoEvents elapsed = Timer - started If elapsed < 0 Then elapsed = elapsed + 86400 Loop While elapsed < 0.25 Next attempt Err.Raise 4605, "PasteWithRetry", "Word could not paste after 20 attempts." End Sub

3
Call the helper after copying

In the macro, keep the Excel range's Copy action immediately before the paste, then replace the Word range's Paste call with PasteWithRetry CNameRange, or pass the Word range your macro uses as the target.

4
Run the batch again

Run the macro from Excel and check several generated Word documents. If it still stops after the retries, verify the copy source and target range rather than extending the loop indefinitely.

Retry the Word paste operation after allowing the Clipboard to settle
Check for other causes: Retries help with Clipboard timing but do not fix an invalid target, an unavailable copy source, or incompatible Clipboard content. DoEvents also permits other events to run, so prevent the batch macro from being started again while it is active.
Free Microsoft Office alternative

Work with Excel and Word files in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for opening and editing spreadsheets and documents. Its Microsoft Office format support helps you move existing files into WPS, though it does not repair Microsoft Word's runtime error or guarantee VBA macro compatibility.

Open and edit Word DOCX documents and Excel XLSX spreadsheetsUse familiar document and spreadsheet interfacesMove existing Office files into a lightweight office suiteWork with spreadsheet content and documents without relying on the affected Word automation
microsoft office alternative - wps office

Frequently Asked Questions

Why does error 4605 happen only on some files?

Clipboard availability can vary during batch processing, so Word may reach Paste before the copied content is ready. Check the Excel Copy statement and use a bounded retry around the Word paste.

Does DoEvents alone guarantee that the paste will work?

No. DoEvents lets other events run, but it does not guarantee that Clipboard content is ready. Retry the paste for a limited time and report the error if it still fails.

What should I check if the macro fails at CountryName?

Check wdDoc.Bookmarks.Exists("CountryName") before retrieving the target range, and verify that the bookmark exists in each document or template. This failure may be separate from error 4605.

Can WPS Office fix error 4605 in my Microsoft Word macro?

No. The error occurs in Microsoft Word automation. WPS Office can open and edit compatible DOCX and XLSX files as an alternative, but existing VBA automation should be tested separately for compatibility.