MI>EditReplace .Find = "^p^p", .Replace = "$$$", .Direction = 0, .MatchCase =
0
MI>EditReplace .Find = "^p", .Replace = "", .Direction = 0, .MatchCase = 0,
MI>EditReplace .Find = "$$$", .Replace = "^p^p", .Direction = 0, .MatchCase =
0
I haven't run this macro, but I think it fails where a document
has four or more consecutive .
For that reason I tend to use a loop of the form:
while found
replace "^p^p^p" with "^p^p"
after which your
code will do the trick.
This is only one variation on a theme of.
On the current project, seeing many pages-left-purposely-blank
with the use of fifty or so consecutive , I used code
that looks like this:
while found
replace "^p^p^p^p^p^p^p^p^p^p^p^p^p^p^p^p" with "^p^p"
while found
replace "^p^p^p^p^p^p^p^p" with "^p^p"
while found
replace "^p^p^p^p" with "^p^p"
while found
replace "^p^p" with "^p^p"
thus nailing
rather large strings of rather quickly.
I hope this helps.
P.S. Users may also want to check for soft-return combinations,
where the soft-return in Word is created by Shift-Enter.
Hence:
while found
replace "^p"+chr$(11) with "^p"
while found
replace chr$(11)+"^p with "^p"
while found
replace chr$(11)+chr$(11) with "^p"
and so on.
From christopher.greaves@ablelink.org
christopher.greaves@pro-mail.com
* 1st 2.00b #6263 * People and Computers
--- PCBoard (R) v15.3 (OS/2) 5
---------------
* Origin: FidoNet: CAP/CANADA Support BBS : 416 287-0234 (1:250/710)
|