deleting paragraph style B and replacing it with paragraph style A
deleting paragraph style B and replacing it with paragraph style A
In my document, there are several very similar paragraph styles. How can I delete paragraph style B and make sure that all paragraphs with paragraph style B will be formatted with paragraph style A?
Re: deleting paragraph style B and replacing it with paragraph style A
G'day, shmuel et al
One way of doing this is to use the Find & Replace system with settings as in the attached illustration. (The Case checkboxes don't really matter here.)
The expression in the Find field was obtained from the drop-down cogwheel menu ("Find what:") under Wild Card > AnyParagraph. The expression in the Replace field is "backslash zero".
Select the contents of the Find field, then Format > Paragraph Style > Paragraph Style B (or whatever).
Select the contents of the Replace field, then Format > Paragraph Style > Paragraph Style A (or whatever).
Then click on the Replace All button.
When making major changes such as this to an entire document, it's advisable to do it on a duplicate, just in case of mishap.
Cheers,
Adrian
One way of doing this is to use the Find & Replace system with settings as in the attached illustration. (The Case checkboxes don't really matter here.)
The expression in the Find field was obtained from the drop-down cogwheel menu ("Find what:") under Wild Card > AnyParagraph. The expression in the Replace field is "backslash zero".
Select the contents of the Find field, then Format > Paragraph Style > Paragraph Style B (or whatever).
Select the contents of the Replace field, then Format > Paragraph Style > Paragraph Style A (or whatever).
Then click on the Replace All button.
When making major changes such as this to an entire document, it's advisable to do it on a duplicate, just in case of mishap.
Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
macOS Ventura
Nisus Writer user since 1996
Re: deleting paragraph style B and replacing it with paragraph style A
With all respect to Adrian, the more straightforward method is to place your cursor in a paragraph with Paragraph Style B and then:
- Choose Paragraph Style:Select All in Style
- Apply the desired Paragraph Style A
philip
Re: deleting paragraph style B and replacing it with paragraph style A
G’day, Philip et al
Much better, Philip!
I don’t think I’ve ever needed to do this on a mass scale before, so I wasn’t aware of that command. Thanks for pointing it out.
Cheers,
Adrian
Much better, Philip!
I don’t think I’ve ever needed to do this on a mass scale before, so I wasn’t aware of that command. Thanks for pointing it out.
Cheers,
Adrian
MacBook Pro (M1 Pro, 2021)
macOS Ventura
Nisus Writer user since 1996
macOS Ventura
Nisus Writer user since 1996
Re: deleting paragraph style B and replacing it with paragraph style A
Hi Adrian and philip
Thanks to both of you for your help! Achieving this with Select All in Style is really easy, and the paragraph style list in my document is much cleaner now.
One thing that was bothering me a bit was that although after all occurrences of text in paragraph style B have been replaced this way by paragraph style A, when I then went on to delete paragraph style B from the style sheet, I was told that "This style is currently used in the document" – but I was not able to find it. I deleted it anyway, and so far I have not had any problems.
Thanks to both of you for your help! Achieving this with Select All in Style is really easy, and the paragraph style list in my document is much cleaner now.
One thing that was bothering me a bit was that although after all occurrences of text in paragraph style B have been replaced this way by paragraph style A, when I then went on to delete paragraph style B from the style sheet, I was told that "This style is currently used in the document" – but I was not able to find it. I deleted it anyway, and so far I have not had any problems.
Re: deleting paragraph style B and replacing it with paragraph style A
I would to know where I can find "Choose Paragraph Style:Select All in Style" in the menus? I can see there is a "Paragraph Style" in the Format menu but it does not have a "Select All in Style" option.
Re: deleting paragraph style B and replacing it with paragraph style A
Really? Mine does. Also you should be able to find it in the Paragraph Style menu of the Paragraph Style icon in the bottom right corner:
philip
Re: deleting paragraph style B and replacing it with paragraph style A
Hello shmuel,
Alternately the style may have been adding attributes that are being overridden, so you might not notice that either.
Tracking down where a style is used in that way is not always easy, especially if it is part of an imported document with the styles created by the importing process.
One reason you may see such a message is that the style may be used in the definition of other styles, either as the "based on" style, or as the "following style". If the deleted style did not add any crucial attributes, you might not even notice the deletion.shmuel wrote: ↑2019-10-25 23:54:04 One thing that was bothering me a bit was that although after all occurrences of text in paragraph style B have been replaced this way by paragraph style A, when I then went on to delete paragraph style B from the style sheet, I was told that "This style is currently used in the document" – but I was not able to find it. I deleted it anyway, and so far I have not had any problems.
Alternately the style may have been adding attributes that are being overridden, so you might not notice that either.
Tracking down where a style is used in that way is not always easy, especially if it is part of an imported document with the styles created by the importing process.
philip
Re: deleting paragraph style B and replacing it with paragraph style A
Thank you, philip!
Re: deleting paragraph style B and replacing it with paragraph style A
Two other points might interest you, @shmuel:
1) You can access "All in Style" from the paragraph Icon in the status bar at the bottom …
2) A while back, I think it was Martin who posted a macro to remove unused styles. I can't find it quickly in the repository, so here it is if you want to try it out.
Hope that helps.
Mark
1) You can access "All in Style" from the paragraph Icon in the status bar at the bottom …
2) A while back, I think it was Martin who posted a macro to remove unused styles. I can't find it quickly in the repository, so here it is if you want to try it out.
Hope that helps.
Mark
Re: deleting paragraph style B and replacing it with paragraph style A
Sorry. You are right. For some reason, initially, I could not see it.vwnisus wrote: ↑2019-10-26 00:04:17 I would to know where I can find "Choose Paragraph Style:Select All in Style" in the menus? I can see there is a "Paragraph Style" in the Format menu but it does not have a "Select All in Style" option.
Really? Mine does.
Also you should be able to find it in the Paragraph Style menu of the Paragraph Style icon in the bottom right corner:
Re: deleting paragraph style B and replacing it with paragraph style A
My pleasure!

Mark

Mark
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: deleting paragraph style B and replacing it with paragraph style A
Great advice and suggestions all around, thanks everyone! It's wonderful having such helpful and good natured users 
Although the original question seems thoroughly answered now, I still want to point out this FAQ topic on searching for formatted text. It covers some of the techniques discussed already, but also introduces some other ways to select text by formatting.

Although the original question seems thoroughly answered now, I still want to point out this FAQ topic on searching for formatted text. It covers some of the techniques discussed already, but also introduces some other ways to select text by formatting.