Originally in Word, now in (of course) LibreOffice.
To delete one page break, put the cursor at the beggining of the page wich is after the page break, and press Backspace
.
To delete multiple page breaks see the answer to: How do I find a hard page or paragrah break and replace it with a text string?
Add Answer is reserved for solutions.
Another solution: a macro as follows:
Sub DeleteAutoPageBreaks
oDoc = ThisComponent
oStyles = oDoc.getStyleFamilies
oPageStyles = oStyles.getByName("PageStyles")
oPageStyleNames() = oPageStyles.getElementNames()
For i = 0 to uBound(oPageStyleNames)
thisName = oPageStyleNames(i)
oPageStyles.removeByName(thisName)
Next i
oCursor = oDoc.Text.CreateTextCursor()
oCursor.GoToStart(False)
Do
If oCursor.BreakType <> com.sun.star.style.BreakType.PAGE_BEFORE Then
If NOT IsEmpty(oCursor.PageDescName) Then
oCursor.PageDescName = ""
oCursor.BreakType = com.sun.star.style.BreakType.NONE
End If
End If
Loop Until NOT oCursor.gotoNextParagraph(False)
Msgbox "Farite"
End Sub
Another solution: a macro as follows:
Sub DeleteAutoPageBreaks
oDoc = ThisComponent
oStyles = oDoc.getStyleFamilies
oPageStyles = oStyles.getByName("PageStyles")
oPageStyleNames() = oPageStyles.getElementNames()
For i = 0 to uBound(oPageStyleNames)
thisName = oPageStyleNames(i)
oPageStyles.removeByName(thisName)
Next i
oCursor = oDoc.Text.CreateTextCursor()
oCursor.GoToStart(False)
Do
If oCursor.BreakType <> com.sun.star.style.BreakType.PAGE_BEFORE Then
If NOT IsEmpty(oCursor.PageDescName) Then
oCursor.PageDescName = ""
oCursor.BreakType = com.sun.star.style.BreakType.NONE
End If
End If
Loop Until NOT oCursor.gotoNextParagraph(False)
Msgbox "Farite"
End Sub