Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Remove Phantom Section Break (Word 97/2000/...)

    Hi,

    I have document based on my template that has a 'phantom' section break. The document structure is as follows:

    Section 1 - Cover Pages (1&2)
    Section 2 - Change Hisory (3)
    Section 3 - TOC
    Section 4 - User Information
    Section 5 - 'phantom' section break few pages within section 4
    Section 6 - Back Cover

    When I use the following code fragment it stops at the beginning of each section. It stops at this phantom section break (CAN'T see the section break marker as per other 'legal' section break!)

    Sub Check4SectionBreaks

    For Each oSec In ActiveDocument.Sections
    Selection.GoTo What:=wdGoToSection, Which:=wdGoToAbsolute, Count:=oSec.Index
    MsgBox ("Index= " & oSec.Index & " Orientation= " & oSec.PageSetup.Orientation)
    if oSec.Index = 5 then
    Selection.MoveLeft
    Selection.Delete
    End If
    Next oSec
    End Sub
    I need to get rid of this but it doesn't delete it. I can delete the characters before and after it (section break is INVISIBLE) but it still retains the section break.

    Has anyone seen this behaviour before? Can anything be done using VB? I need the solution in VB really. I don't know how the document got into this state in the first place. I have seen other documents like this previously. This is doing my head in. <img src=/S/bash.gif border=0 alt=bash width=35 height=39>

    Thanks

    Robie
    Thanks.
    Robie

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Remove Phantom Section Break (Word 97/2000/...)

    Can you post a copy of the document from which (almost) all text has been removed, but with the section breaks intact?

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Phantom Section Break (Word 97/2000/...)

    Thanks for the quick response.

    Unfortunately, I can't upload/download anything from here. Although, I am trying my best at the moment with the tech services to upload the document. Hopefully, I will have something uploaded soon. Sorry for the delay.

    Robie
    Thanks.
    Robie

  4. #4
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Remove Phantom Section Break (Word 97/2000/...)

    Phantom Section Break document upload.
    Attached Files Attached Files
    Thanks.
    Robie

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Remove Phantom Section Break (Word 97/2000/...)

    Your document contains tracked changes. If you display them, you can see and manipulate the phantom section break. To make revisions visible using code:

    ActiveWindow.View.ShowRevisionsAndComments = True

Posting Permissions

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