Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Nov 2001
    Location
    Dallas, TX
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi all: I am using Word 2003 fully updated. I run into this problem on the occasional file received from someone else and I've never solved it. Headers in section 1 & 2 are different and not "linked to previous". I delete on content in section 2 and want to be rid of that last page. I remove the "section break" and the header of section 1 is immediately changed to what was in section 2 and section 2 was removed. If I delete the text in the header of section 2 and then delete the "section break" the old section 2 header text STILL replaces the section 1 header text even though I deleted it. Where could it be coming from? Is there some code somewhere or a macro that is doing this??

    This has bedeviled me for years off-and-on and I want to finally fix this.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Yes, this has always been a feature of deleting a section break in Word: the content before the break joins the section after the break, not the other way around.

    To link the headers of the last section to the one before it, you could run this code. If the footer also need linking, I'm sure you could adapt the code pretty easily.

    Code:
    Sub LastSectionLinkToPrevious()
    Dim intSecLast As Integer
    With ActiveDocument
        intSecLast = .Sections.Count
        If intSecLast = 1 Then Exit Sub
        With .Sections.Item(intSecLast)
            With .Headers(wdHeaderFooterPrimary)
                If .Exists Then .LinkToPrevious = True
            End With
            With .Headers(wdHeaderFooterFirstPage)
                If .Exists Then .LinkToPrevious = True
            End With
            With .Headers(wdHeaderFooterEvenPages)
                If .Exists Then .LinkToPrevious = True
            End With
        End With
    End With
    End Sub

  3. #3
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts
    In addition to Jefferson's comment about how section properties apply, a document section can have left, right, and main headers (and footers), and each of those can have a different first page. If one of those headers was ever created in a section and then switched off, its text will remain.—This is one of the reasons that the document inspector (or remove personal information too) looks for headers and footers.—I don't recall seeing your problem but I can suggest where the other header text might have come from.


    Pam
    Pam Caswell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •