change case

T

Trish

Here's the text: A. great. I need to find, highlight, and change case on
all test in a document that follows A.

Please advise.
 
T

trip_to_tokyo

WORD 2007.

1. I have placed:-

A.

- in 4 places in one WORD document.

2. Ctrl-HOME to go to the top of the document.

3. Ctrl-F to launch the Find and Replace box.

4. In the Find and Replace box put:-

A.

- in the Find tab / Find what: field.

You need to make sure that Match case is selected (click on the More >>
button to reveal this).

5. Click on the Replace tab and type (for example):-

b

- in the Replace with field.

6. Hit Find Next / it finds the first instance of A. / hit Replace

It goes on to find the 2nd instance of A. / hit Replace

It goes on to find the 3rd instance of A. / hit Replace

It goes on to find the 4th instance of A. hit Replace

Warning pops up:-

Word has finished searching the dcoument.

Hit OK.

Jobs done!

If my comments have helped please hit Yes.

Thanks.
 
T

Trish

This did not work. In Word 2003, I would use wildcards, for example, Find A.
$^
Then I would check "highlight all" , then return... then I would use the
change case feature to uppercase. In Word 2007, the "highlight all" key is
not there and the highlight options do not select text, they just highlight
it. How would I get it to select the first letter of everything in my
document that comes after say A. so that I can change just that letter?
 
G

Graham Mayor

I can't say that it is entirely clear what exactly you want to make upper
case and I suspect you mean ^$ and not $^ (neither of which would work with
the wildcard option set) however the following macro will request the search
string and make all the found versions Upper Case. The entered search string
is case sensitive so searching for A. ^$ will find only uppercase A followed
by a full stop (period) followed by any letter.

Sub MakeUCase()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = InputBox("Enter string to find")
Do While .Execute(Forward:=True, _
MatchCase:=True) = True
oRng.Case = wdUpperCase
Loop
End With
End Sub

http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
P

Pamelia Caswell via OfficeKB.com

If by "everything" you mean everything up to the next return, you could use
this search string"

A.^t([A-Za-z0-9 .,']{1,})^13

with wild card search enabled to select all text after A.tab (if there is no
tab, delete the ^T). You can use shft+F3 apply the title case to the
selected text. If you can modify Graham's macro ( add your string, set wild
cards to true, and change to title case), you could do this in one step.


Pam

This did not work. In Word 2003, I would use wildcards, for example, Find A.
$^
Then I would check "highlight all" , then return... then I would use the
change case feature to uppercase. In Word 2007, the "highlight all" key is
not there and the highlight options do not select text, they just highlight
it. How would I get it to select the first letter of everything in my
document that comes after say A. so that I can change just that letter?
WORD 2007.
[quoted text clipped - 47 lines]
 
T

Trish

Pam... I understand your string; however, how do I enable the wildcard search
to "select" the text? In Word 2003, there was a box to check in Find that
said highlight all and it actually selected the text... but in 2007, it is a
reading highlight, not a selection highlight... I'm sure I'm missing
something here... what I need is to select text in a list, example A. yes,
sir. Q. What is your name? A. pam. So I want to find and select for
change every instance in a document where there's an A. (any letter, ie, ^$)
and then I can just do a change case to uppercase after they are all
selected...

Pamelia Caswell via OfficeKB.com said:
If by "everything" you mean everything up to the next return, you could use
this search string"

A.^t([A-Za-z0-9 .,']{1,})^13

with wild card search enabled to select all text after A.tab (if there is no
tab, delete the ^T). You can use shft+F3 apply the title case to the
selected text. If you can modify Graham's macro ( add your string, set wild
cards to true, and change to title case), you could do this in one step.


Pam

This did not work. In Word 2003, I would use wildcards, for example, Find A.
$^
Then I would check "highlight all" , then return... then I would use the
change case feature to uppercase. In Word 2007, the "highlight all" key is
not there and the highlight options do not select text, they just highlight
it. How would I get it to select the first letter of everything in my
document that comes after say A. so that I can change just that letter?
WORD 2007.
[quoted text clipped - 47 lines]
Please advise.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-docmanagement/201004/1

.
 
P

Pamelia Caswell via OfficeKB.com

In the find and replace dialog, click the find-in button, and from the drop-
down, choose main document (that may be the only choice). All the found
paragraphs will be _selected_.

Pam
Pam... I understand your string; however, how do I enable the wildcard search
to "select" the text? In Word 2003, there was a box to check in Find that
said highlight all and it actually selected the text... but in 2007, it is a
reading highlight, not a selection highlight... I'm sure I'm missing
something here... what I need is to select text in a list, example A. yes,
sir. Q. What is your name? A. pam. So I want to find and select for
change every instance in a document where there's an A. (any letter, ie, ^$)
and then I can just do a change case to uppercase after they are all
selected...
If by "everything" you mean everything up to the next return, you could use
this search string"
[quoted text clipped - 21 lines]
 
G

Graham Mayor

The macro I posted yesterday will do that if you enter your string in the
dialog box. If you want it to address the specific example you just quoted,
then change the code to

Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = "A. ^$"
Do While .Execute(Forward:=True, _
MatchCase:=True) = True
oRng.Case = wdUpperCase
Loop
End With

Note that you have shown two spaces after A. in your example and reproduced
above.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Trish said:
Pam... I understand your string; however, how do I enable the wildcard
search
to "select" the text? In Word 2003, there was a box to check in Find that
said highlight all and it actually selected the text... but in 2007, it is
a
reading highlight, not a selection highlight... I'm sure I'm missing
something here... what I need is to select text in a list, example A.
yes,
sir. Q. What is your name? A. pam. So I want to find and select for
change every instance in a document where there's an A. (any letter, ie,
^$)
and then I can just do a change case to uppercase after they are all
selected...

Pamelia Caswell via OfficeKB.com said:
If by "everything" you mean everything up to the next return, you could
use
this search string"

A.^t([A-Za-z0-9 .,']{1,})^13

with wild card search enabled to select all text after A.tab (if there
is no
tab, delete the ^T). You can use shft+F3 apply the title case to the
selected text. If you can modify Graham's macro ( add your string, set
wild
cards to true, and change to title case), you could do this in one step.


Pam

This did not work. In Word 2003, I would use wildcards, for example,
Find A.
$^
Then I would check "highlight all" , then return... then I would use the
change case feature to uppercase. In Word 2007, the "highlight all" key
is
not there and the highlight options do not select text, they just
highlight
it. How would I get it to select the first letter of everything in my
document that comes after say A. so that I can change just that letter?

WORD 2007.

[quoted text clipped - 47 lines]

Please advise.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-docmanagement/201004/1

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top