#1
|
|||
|
|||
Bold each line of text that starts with a recurring symbol
Greetings,
I have researched this at length and found no answer. I have a document with numerous "title" lines, each of which begins with a (§) symbol. Example: § 1. Frogs that jump backwards Except for the leading symbol (§) that begins each, these "title" lines have no relationship to each other. I desire to run a wildcard search-replacement so that each "title" line appears in bold text. Based on research, I have tried this: Find what: ^13\§ *^13 Replace with: \1 ((bold)) Based on Example 6 at this URL (http://word.mvps.org/faqs/general/usingwildcards.htm), I believed that the above should have worked. It did not. Instead, it returned the message "The Replace With text contains a group number which is out of range". Thanks for your time and kind assistance. |
#2
|
||||
|
||||
Your wildcard Find/Replace would need to be either:
Find what: ^13\§ *^13 Replace with: ^& ((bold)) or: Find what: (^13\§ *^13) Replace with: \1 ((bold))
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
Cross-posted at: http://answers.microsoft.com/en-us/o...c-d0ba0033c291
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
Quote:
|
#5
|
|||
|
|||
Thanks
Thanks for your input.
In both cases suggested by macropod, I obtained these results: § 1. Frogs that jump backwards -- was replaced with -- ((bold)) Perhaps I missed something. I will explore further. I did this: Find what: ^13\§ *^13 In the Replace with box, I selected Ctrl+B, with no other entry. Not the most "techie" resolution, perhaps, but it worked. Certainly I would have considered a title style, but I did not create the content. My apologies for cross-posting; I did not realize these sites were associated directly. Thanks again. |
#6
|
||||
|
||||
You're supposed to set the Replacement font property to bold - not to include the literal text! I assumed you knew as much given you had ((bold)) as a replacement criterion in your first post...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
I did not; I do now!
I am not a reg ex novice, but I am no expert, either. I spent a half hour searching for meaning to the expression "/1 ((bold))" in efforts to sort out why it was not working. It is interesting that -- in an area where attention to the literal is paramount -- this was not something to be taken literally. Thanks for your follow-up. I much appreciate it. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Text in #1 is made bold, rest of the document is edited, text in #1 is now not bold | footer-assistance | Word | 1 | 06-29-2015 03:49 AM |
Can i align text so it starts before a bullet point? | at11 | Word | 1 | 03-20-2015 09:12 AM |
Format Bold in one line makes all lines bold | Nitte | Word | 2 | 02-07-2013 12:34 AM |
Making Line Bold | janith | Word VBA | 5 | 05-30-2012 04:04 PM |
How to automate BOLD in a line | madbrit | Word | 5 | 07-02-2011 06:43 PM |