Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
I have an essay written but I have to underline only the 5 letter words in
it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Press Ctrl+H to display the Find & Replace dialog box. Click the More button
(if necessary) to see all options. Check the "Use wildcards" option. Specify the following: "Find what": ????? "Replace with": (leave blank; choose Underline formatting in Format, Font) Then press Replace All. -- Stefan Blom Microsoft Word MVP "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Stefan,
Sorry about the mispelling of your name down the thread. Stefan Blom wrote: Press Ctrl+H to display the Find & Replace dialog box. Click the More button (if necessary) to see all options. Check the "Use wildcards" option. Specify the following: "Find what": ????? "Replace with": (leave blank; choose Underline formatting in Format, Font) Then press Replace All. "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
"Greg Maxey" wrote in message
... Stefan, Sorry about the mispelling of your name down the thread. Well, anyone can make a mistake. The strangest so far is a poster who called me "Ms Blom." :-) -- Stefan Blom Microsoft Word MVP Stefan Blom wrote: Press Ctrl+H to display the Find & Replace dialog box. Click the More button (if necessary) to see all options. Check the "Use wildcards" option. Specify the following: "Find what": ????? "Replace with": (leave blank; choose Underline formatting in Format, Font) Then press Replace All. "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Use a macro containing the following code:
Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Doug,
That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Is a macro really necessary when the simple Find operation Stefan proposed
should do the job? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Thank you.
On Mar 30, 9:21*am, "Suzanne S. Barnhill" wrote: Is a macro really necessary when the simple Find operation Stefan proposed should do the job? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USAhttp://word.mvps.org "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: *Find: *[! ]{3} *Replace with: *^& *formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find * *Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ * * * *MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = * * * *True Set myRange = Selection.Range * * * *Selection.Collapse wdCollapseEnd * * * *myRange.Start = myRange.Start + 1 * * * *myRange.End = myRange.End - 1 * * * *myRange.Font.Underline = wdUnderlineSingle * *Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. *I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. *Thank you -- Greg Maxey - *Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org- |
#9
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
I hadn't previously tested, but I just now did, and the Replace operation
does find a five-letter word at the beginning of the document and at the end of a sentence, as well. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "grammatim" wrote in message ... Thank you. On Mar 30, 9:21 am, "Suzanne S. Barnhill" wrote: Is a macro really necessary when the simple Find operation Stefan proposed should do the job? -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USAhttp://word.mvps.org "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web sitehttp://gregmaxey.mvps.org Word MVP web sitehttp://word.mvps.org- |
#10
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
While wrong for the task at hand (Sorry), Find: [! ]{3} Replace with: ^&
formatted with underline" is not a macro. It is wrong, because I copied it from an old reference I had for finding three letter words. I wasn't disputing Stephan's proposal. If fact I didn't even see it. Looking at the issue a little closer ????? may not completely fit the bill. Is "don't" a five letter word, four letter word with an apostrophe, a four letter word, or a two letter word connected to a three letter word with an apostrophe? Is $12.95 a five letter word?, is a five character zip code a five letter word or a just a number? I suppose if one is just looking for words spelled with five letters of the alphabet then something like: Find: [A-Za-z]{5} may be more desirable. Suzanne S. Barnhill wrote: Is a macro really necessary when the simple Find operation Stefan proposed should do the job? "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#11
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Agreed that "five characters" may not be the same as "five letters."
-- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Greg Maxey" wrote in message ... While wrong for the task at hand (Sorry), Find: [! ]{3} Replace with: ^& formatted with underline" is not a macro. It is wrong, because I copied it from an old reference I had for finding three letter words. I wasn't disputing Stephan's proposal. If fact I didn't even see it. Looking at the issue a little closer ????? may not completely fit the bill. Is "don't" a five letter word, four letter word with an apostrophe, a four letter word, or a two letter word connected to a three letter word with an apostrophe? Is $12.95 a five letter word?, is a five character zip code a five letter word or a just a number? I suppose if one is just looking for words spelled with five letters of the alphabet then something like: Find: [A-Za-z]{5} may be more desirable. Suzanne S. Barnhill wrote: Is a macro really necessary when the simple Find operation Stefan proposed should do the job? "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#12
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Looking at the issue a little closer ????? may not completely fit the
bill. Is "don't" a five letter word, four letter word with an apostrophe, a four letter word, or a two letter word connected to a three letter word with an apostrophe? Is $12.95 a five letter word?, is a five character zip code a five letter word or a just a number? I suppose if one is just looking for words spelled with five letters of the alphabet then something like: Find: [A-Za-z]{5} may be more desirable. Good point. -- Stefan Blom Microsoft Word MVP "Greg Maxey" wrote in message ... While wrong for the task at hand (Sorry), Find: [! ]{3} Replace with: ^& formatted with underline" is not a macro. It is wrong, because I copied it from an old reference I had for finding three letter words. I wasn't disputing Stephan's proposal. If fact I didn't even see it. Looking at the issue a little closer ????? may not completely fit the bill. Is "don't" a five letter word, four letter word with an apostrophe, a four letter word, or a two letter word connected to a three letter word with an apostrophe? Is $12.95 a five letter word?, is a five character zip code a five letter word or a just a number? I suppose if one is just looking for words spelled with five letters of the alphabet then something like: Find: [A-Za-z]{5} may be more desirable. Suzanne S. Barnhill wrote: Is a macro really necessary when the simple Find operation Stefan proposed should do the job? "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
#13
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
how can i underline only 5 letter words?
Really necessary? No. However, once a macro is prepared then it is there
for reuse whenever the need arises again. That is one advantages of a macro. Additionally the macro could easily be enhances to make it very easy to perform other similiar tasks like finding two letter words or 10 letter words. You could even adapt it adapt it to find one, two, three, and four letter words all in one swoop. I believe that Doug posted the macro with the intent to be helpful. Suzanne S. Barnhill wrote: Is a macro really necessary when the simple Find operation Stefan proposed should do the job? "Greg Maxey" wrote in message ... Doug, That misses the first word of the document if 5 characters and the last word of a sentence if 5 characters. This seems to work: Find: [! ]{3} Replace with: ^& formatted with underline. Doug Robbins - Word MVP on news.microsoft.com wrote: Use a macro containing the following code: Dim myRange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(FindText:=" [A-z]{5} ", Forward:=True, _ MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True Set myRange = Selection.Range Selection.Collapse wdCollapseEnd myRange.Start = myRange.Start + 1 myRange.End = myRange.End - 1 myRange.Font.Underline = wdUnderlineSingle Loop End With "ruan99" wrote in message ... I have an essay written but I have to underline only the 5 letter words in it. I do not want to go back and underline them all individually, so I am wondering if there is a way to mass underline only 5 letter words. Thank you -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org -- Greg Maxey - Word MVP My web site http://gregmaxey.mvps.org Word MVP web site http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Best Way to underline last five words of every sentence? | Page Layout | |||
Is there an easy way to ONLY underline words and not the spaces? | Microsoft Word Help | |||
Words obscured by underline | Page Layout | |||
Underline one letter in a word. | Microsoft Word Help | |||
Can you add a bar over words (the opposite of underline)? | Microsoft Word Help |