Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Gerry said:I hope you are very careful with this, because all header/footer information is held in section breaks.
trifest said:i need to combine a lot of material and can't seem to get it to work in Word 2003.
Sub ListSectionBreaks()
Dim var
Dim i As Integer
i = 1
' go to first section
Selection.GoTo What:=wdGoToSection, Which:=wdGoToFirst, Count:=1, Name:=""
For var = 1 To ActiveDocument.Sections.Count
Select Case ActiveDocument.Sections.Item(i).PageSetup.SectionStart
Case 0
MsgBox "Total number of sections in document = " & _
ActiveDocument.Sections.Count & vbCrLf & _
"This is Section " & i & ". The Type = " & _
ActiveDocument.Sections.Item(i).PageSetup.SectionStart _
& " (Continuous )."
Case 1
MsgBox "Total number of sections in document = " & _
ActiveDocument.Sections.Count & vbCrLf & _
"This is Section " & i & ". The Type = " & _
ActiveDocument.Sections.Item(i).PageSetup.SectionStart _
& " (Column Break)."
Case 2
MsgBox "Total number of sections in document = " & _
ActiveDocument.Sections.Count & vbCrLf & _
"This is Section " & i & ". The Type = " & _
ActiveDocument.Sections.Item(i).PageSetup.SectionStart _
& " (NextPage)."
Case 3
MsgBox "Total number of sections in document = " & _
ActiveDocument.Sections.Count & vbCrLf & _
"This is Section " & i & ". The Type = " & _
ActiveDocument.Sections.Item(i).PageSetup.SectionStart _
& " (Even Page)."
Case 4
MsgBox "Total number of sections in document = " & _
ActiveDocument.Sections.Count & vbCrLf & _
"This is Section " & i & ". The Type = " & _
ActiveDocument.Sections.Item(i).PageSetup.SectionStart _
& " (Odd Page)."
Case Else
MsgBox "something else"
End Select
Selection.GoTo What:=wdGoToSection, Which:=wdGoToNext, Count:=1, Name:=""
i = i + 1
Next
End Sub
Sub DeleteALLSections()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^b"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
If acceptable to you, you can change your merge document type to Catalog and re-merge and it will not place section breaks between the records.Essentially what I'm trying to do is that I have sections that I want to combine since I wrote a mail merge function that grabs records from an Access Database but it then puts section breaks after each record but I don't want section breaks after each record but to have them all combined.