Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Wire
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Wire
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Wire
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Idaho Word Man
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/ Replace is auto-capping the words I want to replace with Graham Mayor Microsoft Word Help 8 January 27th 06 02:39 AM
What is required to find two words please Steved Microsoft Word Help 2 December 27th 05 08:41 PM
How to find a series of words and then changing formats MolTom Microsoft Word Help 4 December 13th 05 04:05 PM
First letter in next line changes automatically to a capital lette DAVE Microsoft Word Help 1 April 13th 05 04:51 AM
the first letter on each line always changes to a capital superblues Microsoft Word Help 2 March 11th 05 09:26 PM


All times are GMT +1. The time now is 10:14 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"