![]() |
|
#1
|
||||
|
||||
![]()
Hi Walt,
Telling Word to use wildcards is as easy as checking the 'use wildcards' options on the (expanded - click More) Find/Replace dialogue box. The tricky part is in learning how to encode the Find/Replace expressions. The four I gave in my previous post, though fairly simple, give a hint of what can be done.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Walt,
Are you certain? I have sometimes run into trouble this way, with Word then running together the last word on a line with the first on the next. when I record a macro to do this kind of operation, I have found it necessary, usually, to replace the single paragraph with a single space. |
#3
|
|||
|
|||
![]()
Hi Ulodesk. You're right, thanks for mentioning that. Sometimes it's necessary in that step to replace with a space, though not always. I've seen it both ways.
I never do a whole document at once. Usually I do a few paragraphs at the beginning until I see how it's going. As I get more comfortable I'll do larger sections at a time but it's still a good idea to keep checking. I've seen some documents change several times. ![]() |
#4
|
||||
|
||||
![]() Quote:
The wildcard Find/Replace sequence I posted takes care of the space issues. Here's how it works: Find = ([!^13])([^13])([!^13]) Finds any paragraph break that's has a character other than a paragraph break both before and after it. The three sets of parentheses tell Word that the Find expression has three components we want to keep track of. Replace = \1 \3 Replaces the found paragraph break with a space, keeping the characters before and after. The \1 and \3 correspond with the first and third parentheses from the Find expression. Find = ([ ])[ ]{1,} Find a space character followed by one or more additional space characters. The {1,} tells Word that the preceding expression applies to one or more characters. Replace = \1 Keeps the first space only. Find = [^13]{2,} Find any two or more paragraph breaks (note: we can't use ^p in a wildcard Find). Replace = ^p Replace with only a single paragraph break (note: using ^13 in a wildcard Replace doesn't create proper paragraph breaks - just line breaks that look like them). Find = [ ^13] Find any paragraph break preceded by a space. Replace = ^p Replace with only the paragraph break.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Margin-less/Borderless Printing | tmndi | Word | 2 | 08-13-2011 12:48 AM |
![]() |
markg2 | Word | 2 | 12-28-2010 05:50 PM |
Margin Error ??? | velohead | Word | 3 | 08-10-2010 06:18 AM |
Word Minimum Margin | rangeshram | Word | 0 | 09-24-2008 01:38 AM |
top margin - different first page | beanz | Word | 0 | 06-28-2006 06:32 AM |