#1
|
|||
|
|||
Applying styles via wildcard search not working as expected
I'm trying to use a wildcard string (below) to find unformatted text and apply a style to it. The string finds exactly what I'm looking for, but Word is applying the style to the *prior* paragraph, too, even though the Replace with field is set to just the second grouping in the wildcard string.
I have to have the initial paragraph mark because the string will otherwise find instances of text that I'm not looking to apply the style to. What am I doing wrong? I've restarted Word, thinking that I needed to shake out some residual weirdness in the Find/Replace, to no avail. |
#2
|
||||
|
||||
The Replace command is working on the entire found component which includes the paragraph mark from the preceding content, hence the preceding paragraph getting the style applied.
There may be another more direct way but the method I would normally use involves three steps: 1. Use your current find and include some unique text in the replace without applying formatting. eg replace with "zxzx\2" 2. Find the unique text and replace it with the style formatting 3. Remove the unique text.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Ah, another use of the ol' "temporary dummy string" method -- I'm partial to QQ.
Thanks, Andrew! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tabbing not working as expected? | PhoenixJames | Word | 2 | 08-30-2019 01:52 PM |
Styles and not applying correctly | GinnyBcore | Word | 1 | 10-02-2018 03:18 PM |
Creating bullet animations not working as expected | stpwaddell | PowerPoint | 1 | 01-04-2017 03:10 AM |
Applying styles dynamically? | arkofcovenant | Mail Merge | 1 | 05-08-2015 06:02 AM |
Wildcard search help. | Kempston | Word | 0 | 11-13-2009 03:58 AM |