Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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.PAGE_BEFORE
- End If
- End If
- Loop Until NOT oCursor.gotoNextParagraph(False)
- Msgbox "Farite"
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement