Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the first
How can I find words which start with a capital letter but are not the first
word in a scentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the first
You're going to have to proof-read the damn document anyway if it's already
been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a scentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
No, I wrote the document, there are no "O'Reilly" like words.
The words are Capitalized because they are Important or Keywords. I just want to make them all bold as well. "Jezebel" wrote: You're going to have to proof-read the damn document anyway if it's already been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a scentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
The words are Capitalized because they are Important or Keywords. If you've littered your document with superfluous capitals as in that sentence, you've certainly got a problem. |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
A wildcard search for
[ ][A-Z][a-z]{1,} replace with b^&/b format font bold will help find, add the tags and embolden them, but for reasons addressed by Jezebel I would step through the document rather than replace all. See http://www.gmayor.com/replace_using_wildcards.htm Note that this will embolden the space before the word also. If you want the leading b to be after the space, you will need another replace routine to move it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: No, I wrote the document, there are no "O'Reilly" like words. The words are Capitalized because they are Important or Keywords. I just want to make them all bold as well. "Jezebel" wrote: You're going to have to proof-read the damn document anyway if it's already been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a sentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
Thanks Graham,
Sorry for the multipost, I thought that a programmatic solution may have been required. I have tried this search string and it still finds the first word of every scentence. I will give you a sample paragraph: "You can click on the Add row button to add an extra Custom Field to search. You will notice that a new drop down box appears before the Custom Field drop down box. This will allow you to perform a Logical Operation between the two fields." Also, I use 2 spaces after a full stop if that makes any difference. Thanks. "Graham Mayor" wrote: A wildcard search for [ ][A-Z][a-z]{1,} replace with b^&/b format font bold will help find, add the tags and embolden them, but for reasons addressed by Jezebel I would step through the document rather than replace all. See http://www.gmayor.com/replace_using_wildcards.htm Note that this will embolden the space before the word also. If you want the leading b to be after the space, you will need another replace routine to move it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: No, I wrote the document, there are no "O'Reilly" like words. The words are Capitalized because they are Important or Keywords. I just want to make them all bold as well. "Jezebel" wrote: You're going to have to proof-read the damn document anyway if it's already been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a sentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the first
If they are key terms, it should be a reasonably short list. Don't you
remember what your key terms are? Search for them one at a time and bold them. I hate to use an automated search, since you may have a capitalized word that isn't one of your key terms. Remember that sometimes one of your key terms might also be the first word in a sentence (only one "c"). If you only search for the capitalized words that are NOT the first word in a sentence, you'll miss all the key words that are. "Wire" wrote: How can I find words which start with a capital letter but are not the first word in a scentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
That was why Jezebel said it was a problem and why I suggested you step
through the found entries. There is no way to do what you want in a single pass. You can do it (cautiously) in two passes eg Find ([! ][ ])([A-Z][a-z]{1,}) replace with \1b\2/b - format font bold then Find [a-z][ ] format font bold replace with ^& format font not bold The following macro, which should be approached with caustion as I don't know what else is in your document will do that on your sample text. Sub TagBold() Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "([! ][ ])([A-Z][a-z]{1,})" .Replacement.Text = "\1b\2/b" .Replacement.Font.Bold = True .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "[a-z] " .Font.Bold = True .Replacement.Text = "^&" .Replacement.Font.Bold = False End With Selection.Find.Execute replace:=wdReplaceAll End Sub As for multi-posting. It is not the posts in more than one forum that is the problem, but the lack of a link between them, which results in duplication of effort by the volunteers who post replied here. If you access via NNTP it is a simple matter to link the posts - http://www.gmayor.com/MSNews.htm If you wish to post to more than one newsgroup, then put all the groups in the same 'send-to' line separated by commas. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: Thanks Graham, Sorry for the multipost, I thought that a programmatic solution may have been required. I have tried this search string and it still finds the first word of every scentence. I will give you a sample paragraph: "You can click on the Add row button to add an extra Custom Field to search. You will notice that a new drop down box appears before the Custom Field drop down box. This will allow you to perform a Logical Operation between the two fields." Also, I use 2 spaces after a full stop if that makes any difference. Thanks. "Graham Mayor" wrote: A wildcard search for [ ][A-Z][a-z]{1,} replace with b^&/b format font bold will help find, add the tags and embolden them, but for reasons addressed by Jezebel I would step through the document rather than replace all. See http://www.gmayor.com/replace_using_wildcards.htm Note that this will embolden the space before the word also. If you want the leading b to be after the space, you will need another replace routine to move it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: No, I wrote the document, there are no "O'Reilly" like words. The words are Capitalized because they are Important or Keywords. I just want to make them all bold as well. "Jezebel" wrote: You're going to have to proof-read the damn document anyway if it's already been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a sentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
If the OP had done it manually, the task would have been completed long
since. "Graham Mayor" wrote in message ... That was why Jezebel said it was a problem and why I suggested you step through the found entries. There is no way to do what you want in a single pass. You can do it (cautiously) in two passes eg Find ([! ][ ])([A-Z][a-z]{1,}) replace with \1b\2/b - format font bold then Find [a-z][ ] format font bold replace with ^& format font not bold The following macro, which should be approached with caustion as I don't know what else is in your document will do that on your sample text. Sub TagBold() Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "([! ][ ])([A-Z][a-z]{1,})" .Replacement.Text = "\1b\2/b" .Replacement.Font.Bold = True .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "[a-z] " .Font.Bold = True .Replacement.Text = "^&" .Replacement.Font.Bold = False End With Selection.Find.Execute replace:=wdReplaceAll End Sub As for multi-posting. It is not the posts in more than one forum that is the problem, but the lack of a link between them, which results in duplication of effort by the volunteers who post replied here. If you access via NNTP it is a simple matter to link the posts - http://www.gmayor.com/MSNews.htm If you wish to post to more than one newsgroup, then put all the groups in the same 'send-to' line separated by commas. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: Thanks Graham, Sorry for the multipost, I thought that a programmatic solution may have been required. I have tried this search string and it still finds the first word of every scentence. I will give you a sample paragraph: "You can click on the Add row button to add an extra Custom Field to search. You will notice that a new drop down box appears before the Custom Field drop down box. This will allow you to perform a Logical Operation between the two fields." Also, I use 2 spaces after a full stop if that makes any difference. Thanks. "Graham Mayor" wrote: A wildcard search for [ ][A-Z][a-z]{1,} replace with b^&/b format font bold will help find, add the tags and embolden them, but for reasons addressed by Jezebel I would step through the document rather than replace all. See http://www.gmayor.com/replace_using_wildcards.htm Note that this will embolden the space before the word also. If you want the leading b to be after the space, you will need another replace routine to move it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: No, I wrote the document, there are no "O'Reilly" like words. The words are Capitalized because they are Important or Keywords. I just want to make them all bold as well. "Jezebel" wrote: You're going to have to proof-read the damn document anyway if it's already been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a sentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Find words which start with a capital letter but are not the f
Almost certainly
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jezebel wrote: If the OP had done it manually, the task would have been completed long since. "Graham Mayor" wrote in message ... That was why Jezebel said it was a problem and why I suggested you step through the found entries. There is no way to do what you want in a single pass. You can do it (cautiously) in two passes eg Find ([! ][ ])([A-Z][a-z]{1,}) replace with \1b\2/b - format font bold then Find [a-z][ ] format font bold replace with ^& format font not bold The following macro, which should be approached with caustion as I don't know what else is in your document will do that on your sample text. Sub TagBold() Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "([! ][ ])([A-Z][a-z]{1,})" .Replacement.Text = "\1b\2/b" .Replacement.Font.Bold = True .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchAllWordForms = False .MatchSoundsLike = False .MatchWildcards = True End With Selection.Find.Execute replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "[a-z] " .Font.Bold = True .Replacement.Text = "^&" .Replacement.Font.Bold = False End With Selection.Find.Execute replace:=wdReplaceAll End Sub As for multi-posting. It is not the posts in more than one forum that is the problem, but the lack of a link between them, which results in duplication of effort by the volunteers who post replied here. If you access via NNTP it is a simple matter to link the posts - http://www.gmayor.com/MSNews.htm If you wish to post to more than one newsgroup, then put all the groups in the same 'send-to' line separated by commas. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: Thanks Graham, Sorry for the multipost, I thought that a programmatic solution may have been required. I have tried this search string and it still finds the first word of every scentence. I will give you a sample paragraph: "You can click on the Add row button to add an extra Custom Field to search. You will notice that a new drop down box appears before the Custom Field drop down box. This will allow you to perform a Logical Operation between the two fields." Also, I use 2 spaces after a full stop if that makes any difference. Thanks. "Graham Mayor" wrote: A wildcard search for [ ][A-Z][a-z]{1,} replace with b^&/b format font bold will help find, add the tags and embolden them, but for reasons addressed by Jezebel I would step through the document rather than replace all. See http://www.gmayor.com/replace_using_wildcards.htm Note that this will embolden the space before the word also. If you want the leading b to be after the space, you will need another replace routine to move it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Wire wrote: No, I wrote the document, there are no "O'Reilly" like words. The words are Capitalized because they are Important or Keywords. I just want to make them all bold as well. "Jezebel" wrote: You're going to have to proof-read the damn document anyway if it's already been screwed around with so badly. Apart from words at the start of sentences, there are likely to be acronyms (and words like"O'Reilly") that also need special handling. Trying to automate this is likely to introduce more problems. Maybe not many, but you still have to find them. "Wire" wrote in message ... How can I find words which start with a capital letter but are not the first word in a sentence (or a paragraph). I have a document where Key Terms have been Capitalized and I need to change all these to bBold/b. I know how to change the formatting. I'm having problems finding ONLY the Capitalized Words without the finding also all the first words in a scentence. I also wish to exclude the word "I" of course. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find/ Replace is auto-capping the words I want to replace with | Microsoft Word Help | |||
What is required to find two words please | Microsoft Word Help | |||
How to find a series of words and then changing formats | Microsoft Word Help | |||
First letter in next line changes automatically to a capital lette | Microsoft Word Help | |||
the first letter on each line always changes to a capital | Microsoft Word Help |