Home |
Search |
Today's Posts |
#1
|
|||
|
|||
A way to replace text
I am looking for a nice way to, in effect, find strings of text in a lengthy
Word document and modify them, such as Underlining, or even apply a style, even a character style, which obviously would leave me free to change even that formatting later on with ease. I don't actually want to replace the text. The catch is that the strings, each of which is at the beginning of a paragraph, end with a number immediately preceding a colon. For example "Interrogatory No. 5:", "Interrogatory No. 6:" and so on. There are 3 variations on those strings, the first being the one above, the second being Request to Admit No. n: " and the other "Request to Produce No. n:", with n representing the sequential numbering of these items. Is there a way to do this with Find and Replace? I figured out how to find the strings using wildcards, but I can't figure how to replace with with the same text (or just keep the text) but with new formatting or a character style. Instead I am getting "Interrogatory*" literally. (Of course, we did not create this document) |
#2
|
|||
|
|||
Use ^& (which means content of the find what field) in the replace with
boox. So: MoreUse Wildcards Type - Request to admit No. [0-9] in find what Put cursor in replace with box and type ^& apply the fomatting or style to the the replace with Replace All |
#3
|
|||
|
|||
If you already know how to find the text, then the rest is simple:
1. In the "Replace with" box, type ^$ (which represents the text Word found).* 2. Click on Format, then Font or Style and choose the desired formatting. There are some shortcuts to formatting: if you want to underline the text, you can just press Ctrl+U instead of Format | Font; similarly, Ctrl+I and Ctrl+B work the same as in document text. *If you have really used wildcards (that is, you have "Use wildcards" checked), then you'll need to use \1 in the "Replace with" box (assuming you didn't have your wildcards grouped into more than one string). But you might not need wildcards to find the expressions you cite: You could use "Interrogatory No. ^#:" to search for single-digit numbers, adding another ^# for double digits. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Joe McGuire" wrote in message ... I am looking for a nice way to, in effect, find strings of text in a lengthy Word document and modify them, such as Underlining, or even apply a style, even a character style, which obviously would leave me free to change even that formatting later on with ease. I don't actually want to replace the text. The catch is that the strings, each of which is at the beginning of a paragraph, end with a number immediately preceding a colon. For example "Interrogatory No. 5:", "Interrogatory No. 6:" and so on. There are 3 variations on those strings, the first being the one above, the second being Request to Admit No. n: " and the other "Request to Produce No. n:", with n representing the sequential numbering of these items. Is there a way to do this with Find and Replace? I figured out how to find the strings using wildcards, but I can't figure how to replace with with the same text (or just keep the text) but with new formatting or a character style. Instead I am getting "Interrogatory*" literally. (Of course, we did not create this document) |
#4
|
|||
|
|||
Correction: ^& does work with wildcards (for some reason the Special terms
are not listed alphabetically, so I saw "Find What Expression" and assumed it replaced "Find What Text." -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Suzanne S. Barnhill" wrote in message ... If you already know how to find the text, then the rest is simple: 1. In the "Replace with" box, type ^$ (which represents the text Word found).* 2. Click on Format, then Font or Style and choose the desired formatting. There are some shortcuts to formatting: if you want to underline the text, you can just press Ctrl+U instead of Format | Font; similarly, Ctrl+I and Ctrl+B work the same as in document text. *If you have really used wildcards (that is, you have "Use wildcards" checked), then you'll need to use \1 in the "Replace with" box (assuming you didn't have your wildcards grouped into more than one string). But you might not need wildcards to find the expressions you cite: You could use "Interrogatory No. ^#:" to search for single-digit numbers, adding another ^# for double digits. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Joe McGuire" wrote in message ... I am looking for a nice way to, in effect, find strings of text in a lengthy Word document and modify them, such as Underlining, or even apply a style, even a character style, which obviously would leave me free to change even that formatting later on with ease. I don't actually want to replace the text. The catch is that the strings, each of which is at the beginning of a paragraph, end with a number immediately preceding a colon. For example "Interrogatory No. 5:", "Interrogatory No. 6:" and so on. There are 3 variations on those strings, the first being the one above, the second being Request to Admit No. n: " and the other "Request to Produce No. n:", with n representing the sequential numbering of these items. Is there a way to do this with Find and Replace? I figured out how to find the strings using wildcards, but I can't figure how to replace with with the same text (or just keep the text) but with new formatting or a character style. Instead I am getting "Interrogatory*" literally. (Of course, we did not create this document) |
#5
|
|||
|
|||
Thanks! I will try it!
"Suzanne S. Barnhill" wrote in message ... Correction: ^& does work with wildcards (for some reason the Special terms are not listed alphabetically, so I saw "Find What Expression" and assumed it replaced "Find What Text." -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Suzanne S. Barnhill" wrote in message ... If you already know how to find the text, then the rest is simple: 1. In the "Replace with" box, type ^$ (which represents the text Word found).* 2. Click on Format, then Font or Style and choose the desired formatting. There are some shortcuts to formatting: if you want to underline the text, you can just press Ctrl+U instead of Format | Font; similarly, Ctrl+I and Ctrl+B work the same as in document text. *If you have really used wildcards (that is, you have "Use wildcards" checked), then you'll need to use \1 in the "Replace with" box (assuming you didn't have your wildcards grouped into more than one string). But you might not need wildcards to find the expressions you cite: You could use "Interrogatory No. ^#:" to search for single-digit numbers, adding another ^# for double digits. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Joe McGuire" wrote in message ... I am looking for a nice way to, in effect, find strings of text in a lengthy Word document and modify them, such as Underlining, or even apply a style, even a character style, which obviously would leave me free to change even that formatting later on with ease. I don't actually want to replace the text. The catch is that the strings, each of which is at the beginning of a paragraph, end with a number immediately preceding a colon. For example "Interrogatory No. 5:", "Interrogatory No. 6:" and so on. There are 3 variations on those strings, the first being the one above, the second being Request to Admit No. n: " and the other "Request to Produce No. n:", with n representing the sequential numbering of these items. Is there a way to do this with Find and Replace? I figured out how to find the strings using wildcards, but I can't figure how to replace with with the same text (or just keep the text) but with new formatting or a character style. Instead I am getting "Interrogatory*" literally. (Of course, we did not create this document) |
#6
|
|||
|
|||
Thanks for all your help. It took a while to get it working right but the
job is done! As it turned out, I was not really "Finding" everything and I had to tinker around with that part of it. A lot, actually. Sue's suggestion to Search for "Interrogatory No. ^# found the single digit numbers but searching for the samething with ^## did not find double digit numbers. I read a lengthy MVPS paper on Using Wildcards (http://word.mvps.org/FAQs/General/UsingWildcards.htm) and found that the most reliable way to Find all the strings in each category was to search for "Interrogatory No. *:" and do the same for each of the other 2 categories. Skipping the ":" made a mess. Before actually having Word "Replace All" I was careful to run through each category to be sure I would "get" all or nearly all I was really looking for. Note: I was stumped by so many instances of the Find/Replace skipping over text that exactly matched my Search (I looked as carefully as I could). Just to be sure I tried searching only for simple parts of the string (e.g., "Interrogatory") and the search skipped over them just the same. The source document was a PDF file, itself a scan of a faxed document, which my secretary then converted into Word (actually it ended up as an RTF file--I don't press her on the details of how she does this stuff--she starts to hyperventilate when dealing with anything byond the most elementary aspects of Word and threatens to quit). So I figure something bizarre was going on like invizzzible characters. Ones that only some secret part of the computer can see. "Joe McGuire" wrote in message ... I am looking for a nice way to, in effect, find strings of text in a lengthy Word document and modify them, such as Underlining, or even apply a style, even a character style, which obviously would leave me free to change even that formatting later on with ease. I don't actually want to replace the text. The catch is that the strings, each of which is at the beginning of a paragraph, end with a number immediately preceding a colon. For example "Interrogatory No. 5:", "Interrogatory No. 6:" and so on. There are 3 variations on those strings, the first being the one above, the second being Request to Admit No. n: " and the other "Request to Produce No. n:", with n representing the sequential numbering of these items. Is there a way to do this with Find and Replace? I figured out how to find the strings using wildcards, but I can't figure how to replace with with the same text (or just keep the text) but with new formatting or a character style. Instead I am getting "Interrogatory*" literally. (Of course, we did not create this document) |
#7
|
|||
|
|||
Hi Joe,
So I figure something bizarre was going on like invizzzible characters. Very likely! Ones that only some secret part of the computer can see. Might have been fields (which can be shown with Alt+F9) or hidden text (usually shows when you hit the ¶ button on the formatting toolbar). You can also use "Tools Options View" to toggle the display of field codes, hidden text, and other stuff. Wildcard searches are more prone to be duped by the invisible stuff than regular searches. Regards, Klaus |
#8
|
|||
|
|||
Very likely the interrogatories were numbered using outline numbering. In
which case, you don't have to use F&R; just modify the number format to include underlining. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Klaus Linke" wrote in message ... Hi Joe, So I figure something bizarre was going on like invizzzible characters. Very likely! Ones that only some secret part of the computer can see. Might have been fields (which can be shown with Alt+F9) or hidden text (usually shows when you hit the ¶ button on the formatting toolbar). You can also use "Tools Options View" to toggle the display of field codes, hidden text, and other stuff. Wildcard searches are more prone to be duped by the invisible stuff than regular searches. Regards, Klaus |
#9
|
|||
|
|||
Interesting. I had already replaced the "invizzzzible" text, i.e., the
stuff I could see but Find could not. But I saved prior drafts with the unchanged text so for the heck of it I played around with the problem. I was unable to see anything hidden using either Fields or the paragraph button, which I always set to display anyway. I also went to Tools, Options, View and saw that in the section Formatting marks the box for All was checked. I also checked the other boxes but nothing turned up that I could not already see. I learned a while back (from Ms. Barnhill) that paragraph marks are not always what they seem to be in Find/Find&Replace, especially if the document was not originally created in Word. There are paragraph marks and then there are paragraph marks. Evidently, even plain-looking text may not always be what it appears to be, in a document created outside Word. In this case, Find found around 90-95% of the occurences of the text it searched for so maybe I should look on the bright side. Since the searched items were numbered I was able to detect the ones it missed. On the other hand if such items are not numbered . . . well, there's proof-reading. Thanks! "Klaus Linke" wrote in message ... Hi Joe, So I figure something bizarre was going on like invizzzible characters. Very likely! Ones that only some secret part of the computer can see. Might have been fields (which can be shown with Alt+F9) or hidden text (usually shows when you hit the ¶ button on the formatting toolbar). You can also use "Tools Options View" to toggle the display of field codes, hidden text, and other stuff. Wildcard searches are more prone to be duped by the invisible stuff than regular searches. Regards, Klaus |
#10
|
|||
|
|||
I am not sure how I would know that. The Word document was actually created
as the result of scanning/converting a PDF file and converting it to RTF, and then saving a copy in Word. In my earlier drafts, which still contain the "invizzzzible" text, i.e., what I can see but cannot Find, I cannot discern any Outline Numbering. I stuck the cursor in what would be Outline-numbered headings (e.g. "Interrogatory No. 21") but when I checked Format, Bullets and Numbering, Outline Numbering, the setting was None. I explained a few other aspects in my response to Klaus. I know there is a feature to have Word use Automatically Numbered Lists in Autoformat As You Type. I always keep this feature turned off because it is positively dangerous in the legal setting, where paragraph numbers in a responsive pleading are frequently supposed to match the numbering of what you are answering! In this particular document the paragraphs were not really sequentially numbered. Interrogatories, Requests for Production and Requests for Admissions were intermingled. Thus, e.g., Interrogatory 34 might have been followed by Request for Production No. 24, which may have been followed by Request for Admission No. 15. This could only come from a certain one of these hallowed United States, but discretion precludes me from mentioning the name of this Republic. The whole system obviously even confused its authors, who even got their own numbers totally confused--repeating some, entirely missing some others. "Suzanne S. Barnhill" wrote in message ... Very likely the interrogatories were numbered using outline numbering. In which case, you don't have to use F&R; just modify the number format to include underlining. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Klaus Linke" wrote in message ... Hi Joe, So I figure something bizarre was going on like invizzzible characters. Very likely! Ones that only some secret part of the computer can see. Might have been fields (which can be shown with Alt+F9) or hidden text (usually shows when you hit the ¶ button on the formatting toolbar). You can also use "Tools Options View" to toggle the display of field codes, hidden text, and other stuff. Wildcard searches are more prone to be duped by the invisible stuff than regular searches. Regards, Klaus |
#11
|
|||
|
|||
I should add that the searching I described in my post was without
Wildcards. "Klaus Linke" wrote in message ... Hi Joe, So I figure something bizarre was going on like invizzzible characters. Very likely! Ones that only some secret part of the computer can see. Might have been fields (which can be shown with Alt+F9) or hidden text (usually shows when you hit the ¶ button on the formatting toolbar). You can also use "Tools Options View" to toggle the display of field codes, hidden text, and other stuff. Wildcard searches are more prone to be duped by the invisible stuff than regular searches. Regards, Klaus |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
End/FootNote text style | Page Layout | |||
How to select paragraph between tow specified words? | Microsoft Word Help | |||
I want to replace black text with a different text of another colo | Microsoft Word Help | |||
Highlight Text Replace | Microsoft Word Help | |||
Outline | Page Layout |