logo
search
Others

Fix Microsoft Word Error 4605 When Setting LinkToPrevious

Maira MehtabMaira Mehtab Oct 10, 2026 869 views

Question details

The user encounters a Run-time error when running a macro to unlink a header from a previous section in a document.

How to Fix Word VBA Error 4605 When Setting LinkToPrevious
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the VBA Editor

Press Alt + F11 on your keyboard to open the Microsoft Visual Basic for Applications window.

2
Declare an iteration variable

Locate your macro and declare a variable for iteration, such as typing 'Dim i As Long'.

3
Target the specific document section

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.

4
Loop and apply the property

Write a loop to iterate through the '.Headers' and '.Footers' collections inside the With block, setting each object's '.LinkToPrevious' property to False.

Use a VBA Loop to Iterate Through Headers and Footers
Tip: Switching the document view to Print Layout and ensuring the zoom level is set to 100% before executing the macro can also help prevent this error.
Free Microsoft Office alternative

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. 1. Install WPS Office: Download and install WPS Office on your computer.
  2. 2. Open your document: Launch WPS Writer and open your existing .docx file.
  3. 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.
Seamlessly opens and saves Microsoft Word (.docx) formatsEasy-to-use visual tools for unlinking headers and footersLightweight application that runs smoothly on most devicesFree alternative to costly Microsoft Office subscriptions
QA img-9

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.