Fix Microsoft Word Error 4605 When Setting LinkToPrevious
Question details
The user encounters a Run-time error when running a macro to unlink a header from a previous section in a document.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Executing a VBA macro to modify the LinkToPrevious property of a document's header or footer.
- Observed behavior
- Microsoft Word incorrectly throws Run-time error 4605, stating that no previous section exists, even when the document contains prior sections.
Ensure your document contains at least two distinct sections and is displayed in Print Layout view, as VBA behavior can sometimes be disrupted by the active document view state.
Use a VBA Loop to Iterate Through Headers and Footers
Instead of calling the property directly on the section, iterating through the header and footer collections can bypass this application defect.
Since Error 4605 is often a glitch in Word's VBA engine related to the document state, explicitly defining your variables and looping through the header and footer objects provides a more stable execution path.
Press Alt + F11 on your keyboard to open the Microsoft Visual Basic for Applications window.
Locate your macro and declare a variable for iteration, such as typing 'Dim i As Long'.
Use a 'With ActiveDocument.Sections(2)' block (adjust the number to your target section) to focus the script on the correct part of the document.
Write a loop to iterate through the '.Headers' and '.Footers' collections inside the With block, setting each object's '.LinkToPrevious' property to False.

Report the Defect to Microsoft Support
If the error persists across different scripts, report it as a bug to Microsoft, as it is a known issue in certain Word builds.
Try WPS Office for Bug-Free Document Formatting
Struggling with Microsoft Word VBA errors? Switch to WPS Office. It provides a lightweight, highly compatible alternative with an intuitive interface for managing headers, footers, and sections without the need for complex macros.
- 1. Install WPS Office: Download and install WPS Office on your computer.
- 2. Open your document: Launch WPS Writer and open your existing .docx file.
- 3. Manage headers easily: Double-click the header area to reveal the Header and Footer tab, where you can easily toggle the 'Link to Previous' setting visually without using VBA code.

Frequently Asked Questions
Why does Word say no previous section exists when there is one?
This is a known Run-time defect in Microsoft Word's VBA engine. It often occurs due to conflicts with the current zoom level, document view mode (like Draft view), or preceding code that hasn't fully committed document layout changes.
Can changing the document view fix VBA error 4605?
Yes, ensuring the document is set to Print Layout view and 100% zoom before running the macro can sometimes prevent the VBA engine from misreading the section count and triggering the error.
How do I unlink headers manually without VBA?
Double-click the header of the section you want to change. In the Header & Footer menu that appears on the ribbon, click the 'Link to Previous' button to deselect it.




