Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Best Way to underline last five words of every sentence?
I would like go through my long document and underline the last five words of
every sentence. What would be the best way go about this? I am working with Word 2003. Suggestions more than welcome. |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Best Way to underline last five words of every sentence?
Use a macro containing the following code:
Dim myrange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(Findtext:=". ", Forward:=True, MatchWildcards:=False, Wrap:=wdFindStop) = True Set myrange = Selection.Range Selection.Collapse wdCollapseEnd myrange.MoveStart Unit:=wdWord, Count:=-5 myrange.End = myrange.End - 2 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 "e125" wrote in message ... I would like go through my long document and underline the last five words of every sentence. What would be the best way go about this? I am working with Word 2003. Suggestions more than welcome. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I delete words to the end of a sentence | Microsoft Word Help | |||
How do I delete 'enter' between 2 words in a sentence? | Microsoft Word Help | |||
Words obscured by underline | Page Layout | |||
count words per sentence | Microsoft Word Help | |||
Can you add a bar over words (the opposite of underline)? | Microsoft Word Help |