Microsoft Office Forums Delete a page after Section Break Next Page

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-13-2011, 09:09 PM
Aston Aston is offline Delete a page after Section Break Next Page Windows XP Delete a page after Section Break Next Page Office 2007
Novice
Delete a page after Section Break Next Page
 
Join Date: May 2011
Posts: 15
Aston is on a distinguished road
Default Delete a page after Section Break Next Page

Hello everyone,

Working closely with Word for almost a year as an editor, I've gotten used to the fact that it likes to pull pranks on you. And sometimes you have to conduct some crazy manipulations to do some simple things.



I wonder if deleting a page after a Section Break Next Page is an example of that.

I know that the page that follows is the result of the type of the Section Break, which in this case is "Next Page", so Word automatically adds a new page after it. I have to delete the Section Break Next Page first, but it controls to many formatting elements (the page has a different header and footer and page orientation), so deleting it results in losing all that formatting.

Is it possible to delete the page after Section Break Next Page painlessly?

I attached an example file just in case. (I use Word 2007)

Thank you very much for your help.
Attached Files
File Type: docx PageThreeToBeDeleted.docx (21.9 KB, 11 views)
Reply With Quote
  #2  
Old 07-14-2011, 09:22 AM
Ulodesk Ulodesk is offline Delete a page after Section Break Next Page Windows 7 32bit Delete a page after Section Break Next Page Office 2007
Word 2013 Expert Cert
 
Join Date: Sep 2009
Location: Virginia
Posts: 764
Ulodesk is on a distinguished road
Default

Hi, Aston. As long as you don't intend to have any pages follow your landscape page, you can delete the next-page section break on it, i.e., your second section break. The trick is, you must first change the page orientation of page three to landscape.

Best,
Ulodesk
Reply With Quote
  #3  
Old 07-14-2011, 02:41 PM
Aston Aston is offline Delete a page after Section Break Next Page Windows XP Delete a page after Section Break Next Page Office 2007
Novice
Delete a page after Section Break Next Page
 
Join Date: May 2011
Posts: 15
Aston is on a distinguished road
Default

Thanks for your reply, Ulodesk.

But it only solves half of the problem.

As I mentioned (and as you can see in my example file attached), the page that needs to be deleted has a different header and footer. When you delete Section Break Next Page on the previous page, it "inherits" the footer and header of the deleted page.

So before deleting the page I do not need, I have to change its orientation, then make sure my headers and footers are the same on both pages, and what if I also have a multiple column layout on the previous page, I have to set up the same layout on the to-be-deleted page as well. Because I know that all this formatting will be gone once I remove the Section Break.

Don't you think it's just too much hustle for a page that's going to be deleted anyway?

Regards,
Aston
Reply With Quote
  #4  
Old 07-14-2011, 03:41 PM
macropod's Avatar
macropod macropod is offline Delete a page after Section Break Next Page Windows 7 64bit Delete a page after Section Break Next Page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,525
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Hi Aston,

Before deleting the unwanted Section, you need to format it the same as the preceding Section, including header & footer content.

If the unwanted page is created knowing its "a page that's going to be deleted anyway", why are you creating it in the first place?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 07-14-2011, 04:50 PM
Aston Aston is offline Delete a page after Section Break Next Page Windows XP Delete a page after Section Break Next Page Office 2007
Novice
Delete a page after Section Break Next Page
 
Join Date: May 2011
Posts: 15
Aston is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
If the unwanted page is created knowing its "a page that's going to be deleted anyway", why are you creating it in the first place?
Because I edit other people's documents as my job. And some documents are really screwed up. Sometimes they put section breaks on every page. I guess they mix them up with page breaks. Really annoying.

Last edited by Charles Kenyon; 10-26-2018 at 06:40 AM.
Reply With Quote
  #6  
Old 07-14-2011, 05:43 PM
macropod's Avatar
macropod macropod is offline Delete a page after Section Break Next Page Windows 7 64bit Delete a page after Section Break Next Page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,525
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Hi Aston,

You could use a macro to expedite the process. Here's one to take care of the most common issues.
To use it, simply select a range that spans however many Section breaks need to be deleted for the Sections you want to merge. For example, if you want to merge two consecutive Sections, simply select a range spanning the offending Section break. For three Sections, select a range spanning both offending Section breaks.
Code:
Sub MergeSections()
Application.ScreenUpdating = False
Dim sPageHght As Single, sPageWdth As Single
Dim sHeaderDist As Single, sFooterDist As Single
Dim sTMargin As Single, sBMargin As Single
Dim sLMargin As Single, sRMargin As Single
Dim sGutter As Single, sGutterPos As Single
Dim lPaperSize As Long, lGutterStyle As Long
Dim lMirrorMargins As Long, lVerticalAlignment As Long
Dim lScnStart As Long, lScnDir As Long
Dim lOddEvenHdFt As Long, lDiffFirstHdFt As Long
Dim bTwoPagesOnOne As Boolean, bBkFldPrnt As Boolean
Dim bBkFldPrnShts As Boolean, bBkFldRevPrnt As Boolean
Dim bOrientation As Boolean, oHdFt As HeaderFooter
Dim Sctn1 As Section, Sctn2 As Section
With Selection
  If .Sections.Count = 1 Then
    MsgBox "Selection does not span a Section break", vbExclamation
    Exit Sub
  End If
  Set Sctn1 = .Sections.First: Set Sctn2 = .Sections.Last
  With Sctn1.PageSetup
    lPaperSize = .PaperSize
    lGutterStyle = .GutterStyle
    bOrientation = .Orientation
    lMirrorMargins = .MirrorMargins
    lScnStart = .SectionStart
    lScnDir = .SectionDirection
    lOddEvenHdFt = .OddAndEvenPagesHeaderFooter
    lDiffFirstHdFt = .DifferentFirstPageHeaderFooter
    lVerticalAlignment = .VerticalAlignment
    sPageHght = .PageHeight
    sPageWdth = .PageWidth
    sTMargin = .TopMargin
    sBMargin = .BottomMargin
    sLMargin = .LeftMargin
    sRMargin = .RightMargin
    sGutter = .Gutter
    sGutterPos = .GutterPos
    sHeaderDist = .HeaderDistance
    sFooterDist = .FooterDistance
    bTwoPagesOnOne = .TwoPagesOnOne
    bBkFldPrnt = .BookFoldPrinting
    bBkFldPrnShts = .BookFoldPrintingSheets
    bBkFldRevPrnt = .BookFoldRevPrinting
  End With
  With Sctn2.PageSetup
    .GutterStyle = lGutterStyle
    .MirrorMargins = lMirrorMargins
    .SectionStart = lScnStart
    .SectionDirection = lScnDir
    .OddAndEvenPagesHeaderFooter = lOddEvenHdFt
    .DifferentFirstPageHeaderFooter = lDiffFirstHdFt
    .VerticalAlignment = lVerticalAlignment
    .PageHeight = sPageHght
    .PageWidth = sPageWdth
    .TopMargin = sTMargin
    .BottomMargin = sBMargin
    .LeftMargin = sLMargin
    .RightMargin = sRMargin
    .Gutter = sGutter
    .GutterPos = sGutterPos
    .HeaderDistance = sHeaderDist
    .FooterDistance = sFooterDist
    .TwoPagesOnOne = bTwoPagesOnOne
    .BookFoldPrinting = bBkFldPrnt
    .BookFoldPrintingSheets = bBkFldPrnShts
    .BookFoldRevPrinting = bBkFldRevPrnt
    .PaperSize = lPaperSize
    .Orientation = bOrientation
  End With
  With Sctn2
    For Each oHdFt In .Footers
      oHdFt.LinkToPrevious = Sctn1.Footers(oHdFt.Index).LinkToPrevious
      If oHdFt.LinkToPrevious = False Then
        With oHdFt.Range
          .FormattedText = Sctn1.Footers(oHdFt.Index).Range.FormattedText
          Do While .Characters.Last.Previous = vbCr
            .Characters.Last.Previous.Delete
            If .Characters.Count = 1 Then Exit Do
          Loop
        End With
      End If
    Next
    For Each oHdFt In .Headers
      oHdFt.LinkToPrevious = Sctn1.Headers(oHdFt.Index).LinkToPrevious
      If oHdFt.LinkToPrevious = False Then
        With oHdFt.Range
          .FormattedText = Sctn1.Headers(oHdFt.Index).Range.FormattedText
          Do While .Characters.Last.Previous = vbCr
            .Characters.Last.Previous.Delete
            If .Characters.Count = 1 Then Exit Do
          Loop
        End With
      End If
    Next
  End With
  While .Sections.Count > 1
    .Sections.First.Range.Characters.Last.Delete
  Wend
End With
Set Sctn1 = Nothing: Set Sctn2 = Nothing
Application.ScreenUpdating = True
End Sub
For PC macro installation & usage instructions, see: http://www.gmayor.com/installing_macro.htm
For Mac macro installation & usage instructions, see: http://word.mvps.org/Mac/InstallMacro.html
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
why the "section break-next page" is switched to "section break-continuous"? Jamal NUMAN Word 6 12-14-2011 03:35 PM
Delete a page after Section Break Next Page Page break - next page Commodore Word 7 07-17-2011 12:09 AM
Delete a page after Section Break Next Page Section Break Continuous: doesn't affect the format of the page numbering Jamal NUMAN Word 2 06-22-2011 04:46 PM
Delete a page after Section Break Next Page Page numbering starting on 2 after section break pamm13 Word 1 06-22-2011 11:10 AM
Delete a page after Section Break Next Page Anchoring a section break to the bottom of a page, and having a table pass over it??? h3rk Word Tables 1 11-20-2009 07:34 AM


All times are GMT -7. The time now is 01:28 PM.


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