Page 1 of 1

deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-24 04:11:19
by shmuel
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

Posted: 2019-10-25 02:23:21
by adryan
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.)

Changing Paragraph Style.jpg
Changing Paragraph Style.jpg (190.74 KiB) Viewed 5100 times

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

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-25 02:40:00
by phspaelti
With all respect to Adrian, the more straightforward method is to place your cursor in a paragraph with Paragraph Style B and then:
  1. Choose Paragraph Style:Select All in Style
  2. Apply the desired Paragraph Style A
Find is not really needed for this.

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-25 02:48:46
by adryan
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

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-25 23:54:04
by shmuel
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.

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-26 00:04:17
by vwnisus
phspaelti wrote:
2019-10-25 02:40:00
With all respect to Adrian, the more straightforward method is to place your cursor in a paragraph with Paragraph Style B and then:
  1. Choose Paragraph Style:Select All in Style
  2. Apply the desired Paragraph Style A
Find is not really needed for this.
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

Posted: 2019-10-26 00:31:42
by phspaelti
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.
Select_All_In_Style_1.jpg
Select_All_In_Style_1.jpg (74.39 KiB) Viewed 5059 times
Also you should be able to find it in the Paragraph Style menu of the Paragraph Style icon in the bottom right corner:
Select_All_In_Style_2.png
Select_All_In_Style_2.png (27.18 KiB) Viewed 5059 times
Select_All_In_Style_3.png
Select_All_In_Style_3.png (136.49 KiB) Viewed 5059 times

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-26 03:31:53
by phspaelti
Hello shmuel,
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.
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.
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.

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-26 04:20:12
by shmuel
Thank you, philip!

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-26 08:26:21
by xiamenese
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 …
Screenshot 2019-10-26 17.04.23.png
Screenshot 2019-10-26 17.04.23.png (288.52 KiB) Viewed 5026 times
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.
Remove Unused Styles.nwm
(7.41 KiB) Downloaded 98 times
Hope that helps.

Mark

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-26 23:39:27
by vwnisus
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:
Sorry. You are right. For some reason, initially, I could not see it.

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-28 03:00:37
by shmuel
Thank you, Mark!

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-28 09:32:49
by xiamenese
My pleasure!

:)

Mark

Re: deleting paragraph style B and replacing it with paragraph style A

Posted: 2019-10-29 10:04:05
by martin
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.