Find & replace, find text with Paragraph Shading

Get help using and writing Nisus Writer Pro macros.
Post Reply
Ignaceb
Posts: 1
Joined: 2013-01-12 09:54:16

Find & replace, find text with Paragraph Shading

Post by Ignaceb » 2013-01-12 11:45:12

I'm using an Applescript to put all emails of a "dossier" in a rtf file.
One "dossier" can have thousands of pages of email. The rtf text has to be cleaned: multiple returns, spaces, ... Nisus seams to be perfect therefore.
The rtf output is a continuous file. I want to change this: there has to be a pagebreak at the start of each email.
The rtf output formats the header of each mail in bold + Paragraph Shading color CCCCCC (Format, Background Color, Show Background Colors, Color Palettes, Web Safe Colors, a light gray called CCCCCC).
How can I write a macro command:
Find and replace,
find "return" + text string 'From:' in bold + Paragraph Shading CCCCCC
replace "page break" + same text string en paragraph shading
Attachments
ReturnToChangeIntoPageBreak.png
ReturnToChangeIntoPageBreak.png (18.52 KiB) Viewed 2756 times

User avatar
phspaelti
Posts: 912
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Find & replace, find text with Paragraph Shading

Post by phspaelti » 2013-01-15 19:52:05

Hello Ignaceb,

Let me first make the following suggestions:

On your Find expression let me suggest the following:
  • Use "Start of Paragraph" (This can be found in the "gear" menu under "Special Positions")
  • Instead of repeating the Find express in the Replace expression use "Followed By()" (This can be found under "Match")
So your Find and Replace window should look like this:

Now if you want to keep this as a macro you can save it using the "Macroize" feature under the gear menu.
Attachments
Nisus Forum Find.tiff
Nisus Forum Find.tiff (88.91 KiB) Viewed 2739 times
philip

Post Reply