Reset all paragraph style from another document

asked 2017-10-26 15:32:50 +0200

reg4arz gravatar image

Hi to all, i want to write a macro that reset all the paragraph style in a writer document to a specific format. The "good" format is stored in a given file, let's say that this file has a stile "foo" with some property that is child of "bar" style.

I have then another writer file, if this file has no foo and bar style, they get imported as they are from the first document. If they are present but with different properties or parent-child structure, they are forced exactly as the first file.

How can i do that? Any hints?

edit retag flag offensive close merge delete



Why do you want a macro? You can simply import styles using the Stylist with overwrite on.

gabix gravatar imagegabix ( 2017-10-26 21:38:42 +0200 )edit

I did not know te overwrite option... thanks! anyway there's a way to call this feature in a lobasic macro?

reg4arz gravatar imagereg4arz ( 2017-10-27 15:15:02 +0200 )edit

No idea, sorry. However, I would follow a different way: simply (well, relatively simply) programmatically create styles in an open document.

gabix gravatar imagegabix ( 2017-10-27 15:52:53 +0200 )edit