Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2019, 08:14 AM
Ulodesk Ulodesk is offline Deleting continuous section breaks Windows 7 64bit Deleting continuous section breaks Office 2013
Word 2013 Expert Cert
Deleting continuous section breaks
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Deleting continuous section breaks

From long experience, I avoid continuous section breaks (CSB) like the plague, but occasionally I have to deal with them in business proposals, when a writer has inserted thmn for what should be a borderless table. I had this experience yesterday, with the following difficulty.

Two documents, each from our template, which has a next-page section break (NPSB) after the title page and another after the front matter, before normal page numbering begins. One doc had two CSBs on one page; the other, as far as I could tell (even checking the full document in draft view), a surprising three. In both cases, I was unable to delete the CSBs without having the NPSB preceding them changed into a CSB. (In one case, removal also eded up converting every text paragraph to a comma followed by a space, but the document may have had some unrelated corruption.)

I tried separating the CSBs from the NPSB above with extra paragraphs, an addtional NPSB, and so forth, but the conversion happened each time.

In both cases, my only solution was to delete all section breaks and transfer everything after front matter (minus a final emplty paragraph), into a fresh document based on the same template with its title page and front matter properly segregated.



My questions are why the conversion of the NPSB occurs, and whether there is a method of deleting the CSBs without encountering this difficulty.

Thank you.
Reply With Quote
  #2  
Old 03-14-2019, 02:43 PM
macropod's Avatar
macropod macropod is offline Deleting continuous section breaks Windows 7 64bit Deleting continuous section breaks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could insert next page section breaks both sides of the continuous one, then select all three breaks and delete them together. The following macro automates the process:
Code:
Sub DelContBrk()
Dim Rng As Range
With Selection.Sections.First
  Set Rng = .Range.Characters.Last
    With Rng
      .InsertBreak Type:=wdSectionBreakNextPage
      .Start = .Start - 1
      .End = .End + 1
      .Characters.Last.Next.InsertBreak Type:=wdSectionBreakNextPage
      .End = .End + 1
      .Text = vbNullString
    End With
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-18-2019, 10:07 AM
Ulodesk Ulodesk is offline Deleting continuous section breaks Windows 7 64bit Deleting continuous section breaks Office 2013
Word 2013 Expert Cert
Deleting continuous section breaks
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Breaks

Thank you, Paul; much obliged.
Reply With Quote
  #4  
Old 03-18-2019, 10:35 AM
Ulodesk Ulodesk is offline Deleting continuous section breaks Windows 7 64bit Deleting continuous section breaks Office 2013
Word 2013 Expert Cert
Deleting continuous section breaks
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Almost...

Paul, I think I need a bit of further clarification.In the attached text document, which replicates the situation I had -- multi-coluns between 2 CSBs and an odd CSB further on. I have tried running your macro various ways, with different results. I see that it says, Selection, which I take to me that I must select a part of the document at least including the three CSBs. I assume that including more in the selection is not a problem. When I run the macro in this manner, it converts the document above the section also to 2 columns.

If I select only the text between the first two section breaks, it works, leaving a single NPSB above, but this leaves the remaining CSB in place.

I know you are a master at macros. Is there something I have misunderstood from your indication?

Thanks.
Reply With Quote
  #5  
Old 03-18-2019, 02:00 PM
macropod's Avatar
macropod macropod is offline Deleting continuous section breaks Windows 7 64bit Deleting continuous section breaks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The macro deletes whatever Section break terminates the current selection's first Section; it doesn't process multiple Sections.

There is no attachment to your post.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 03-19-2019, 06:14 AM
Ulodesk Ulodesk is offline Deleting continuous section breaks Windows 7 64bit Deleting continuous section breaks Office 2013
Word 2013 Expert Cert
Deleting continuous section breaks
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Thanks again.

Thank you for the clarification. If I select the 2-column text and the second CSB, the macro then removes both CSBs, returning the 2-column text to one and leaving the NPSB above. Selecting the remaining, odd CSB further down and running the macro deletes it without altering the NPSB.

Very useful!
Attached Files
File Type: docx Test doc.docx (27.2 KB, 6 views)
Reply With Quote
Reply

Tags
section breaks continuous



Similar Threads
Thread Thread Starter Forum Replies Last Post
Deleting continuous section breaks Word 2007, cannot insert Section Break (Continuous), only Section Break (Next Page) btse1 Word 3 11-01-2018 09:23 AM
Word 2013 - When deleting section breaks, cursor jumps to beginning of document ranholmom66 Word 3 07-01-2016 06:01 AM
Deleting continuous section breaks Hidden page breaks and section breaks jrasicmark Word 3 06-02-2014 11:28 PM
Deleting continuous section breaks Section - Page Break changes to Section - continuous? donaldadams1951 Word VBA 13 03-27-2014 07:03 PM
Deleted Section Breaks Changes Page Breaks Brantnshellie Word 0 02-01-2009 09:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft