Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 03-24-2014, 03:42 PM
macropod's Avatar
macropod macropod is offline Section - Page Break changes to Section - continuous? Windows 7 32bit Section - Page Break changes to Section - continuous? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

Replace your 'GetAndRemoveSectionByInstanceNumber' sub with:
Code:
Sub GetAndRemoveSectionByInstanceNumber()
Dim strSearchString As String, ScnBrk As Long, i As Long
strSearchString = "Inst#: " & ReportInstance
With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = strSearchString
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchWildcards = True
    .Execute
  End With
  If .Find.Found = True Then
    i = .Duplicate.Sections(1).Index - 1
    ScnBrk = .Sections(i).PageSetup.SectionStart
    .Duplicate.Sections(1).Range.Delete
    .Sections(i).PageSetup.SectionStart = ScnBrk
  End If
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Section - Page Break changes to Section - continuous? Deleting section break and retaining section properties New Daddy Word 6 02-03-2014 07:09 PM
Section - Page Break changes to Section - continuous? Section Break (Next Page) replaces Section Break (Continuous) when deleted Carlabasson Word 2 03-25-2013 10:13 PM
Continuous section break and column changes Jim B Word 3 11-27-2012 02:25 PM
why the "section break-next page" is switched to "section break-continuous"? Jamal NUMAN Word 6 12-14-2011 03:35 PM
Section - Page Break changes to Section - continuous? Section Break Continuous: doesn't affect the format of the page numbering Jamal NUMAN Word 2 06-22-2011 04:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:01 AM.


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