How do I delete over 200 ConvertedN Page styles?

I really want just one page style, but as a result of a conversion from RTF the document has over 200 custom styles labeled “Converted#” where the number is 1 to over 200. I don’t want to go in and modify every single page style in order to have the same margins and paper size, but I can’t delete any of the styles. I’ve tried choosing “custom styles” but I still just get a “New” or “Modify” option. I can rename the styles one at a time, but can’t delete them or revert them to Default Page Style.

What on earth can I do???

1 Like

I use a macro from old good days of OpenOffice.org and oooforum.org to remove custom styles (and those ConvertedXX are deemed to be custom styles):

Run the DeleteCustomStyles routine and select what you need to be deleted.

3 Likes

Old post but: this saved my bacon! Thanks to whoever created this macro and you for posting this. I have a Microsoft Word (.docx) document that was wrongly formatted already inside MS Word. I was trying to fix this using LibreOffice Writer, but the problem I ran into is that I would have had to manually go through this hundreds of pages long document resetting the page style of every single page. This might have taken hours. Using this macro I was done within a minute.

You can not delete the styles what are in use in the actual document. You must set all of the page styles to the Default before you try to delete the numbered “Converted” styles.

And never use the MS-related foreign, never standardized file types in the future. This behavior is related to them, because they not support the page styles. The .doc fileformat stores the page properties individually for every page.
Always use the International Standard ODF file types.

I don’t think there is a way to set the page to the Default Page Style.

Incorrect. Page styles can be deleted even when used. They simply revert to the default page style.

1 Like

If double-click on Default Page Style in the side style pane, page styles view, does not work, select the whole document (Ctrl+A) and double-click page style name.

Importing from such “exotic” formats as RTF is always a nightmare. I ended up in pasting plain text in a new document and reformatting it. This avoided style clutter. Yes, not user-friendly over 200 pages.

I think you might have to individually set each page to Default Page Style.

  1. Open the Sidebar and display the Styles pane. Click on the Page Style icon
    PageStylesIcon
  2. Click in the first page and then in the Styles pane double click Default Page Style to apply it
  3. Repeat for 200 pages. I tried selecting all and double-clicking but it didn’t change the page style at all on any pages.

The easier way is to select everything, copy it and paste it into a new document. use @gabix linked macro

Open in WordPad and save as a .txt file then open in LibreOffice. No Converted# Styles. If this works as a solution check the uptick.

Yes, that’s basically what I did. I then had to redo all of the formatting, but at least I don’t have all those page styles to deal with.

A solution that suited me was to use Calibre to convert a book sized odt or docx file to epub, then back again to docx. It removed the custom page styles and headers.

To delete multiple paragraph styles and replace then with the default paragraph style do the following.
1 Ensure the paragrah styles includinng the Converted styles are dispayed in the style side bar,
2 In the document press Control + A to select the entire document.
3 In the styles side bar, hold down the Shift key select the first Converted paragraph style and press the down arrow until all the converted styles are selected.
4 Press delete.
This worked for me using the latest verion of LibreOffice and Windows 10.

Seems to me a step is missing in your procedure between steps 2 and 3. A style can be deleted only when it is not in use. Consequently, if your procedure works, then none of the Converted x styles were effectively used in your document. Otherwise you must apply some page style to your document, such as Default Page Style, after step 2.

When I originally wrote my reply, I had no access to Converted Page Styles,. Having now acquired a document with them, Unfortunately, my solution doesn’t work, I guess for the reason pointed out by ajlittoz.
Apologies and please ignore my posting.