Skip to content

Instantly share code, notes, and snippets.

@g0ddest
Created November 12, 2014 20:52
Show Gist options
  • Save g0ddest/9c8652903797bd8b6942 to your computer and use it in GitHub Desktop.
Save g0ddest/9c8652903797bd8b6942 to your computer and use it in GitHub Desktop.
Libreoffice remove all colontitules
sub RemoveStyles
oDoc = ThisComponent
oStyles = oDoc.getStyleFamilies
oPageStyles = oStyles.getByName("PageStyles")
oPageStyleNames() = oPageStyles.getElementNames()
For i = 0 to uBound(oPageStyleNames)
thisName = oPageStyleNames(i)
if InStr(thisName, "Converted") <> 0 then
oPageStyles.removeByName(thisName)
end if
next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment