Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.pagelayout
e125 e125 is offline
external usenet poster
 
Posts: 31
Default 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   Report Post  
Posted to microsoft.public.word.pagelayout
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I delete words to the end of a sentence Starnet Microsoft Word Help 3 May 19th 08 03:12 PM
How do I delete 'enter' between 2 words in a sentence? Prateeksha Microsoft Word Help 2 April 22nd 06 12:52 PM
Words obscured by underline Nadiah Page Layout 0 August 3rd 05 08:56 PM
count words per sentence cfb Microsoft Word Help 1 February 8th 05 10:23 PM
Can you add a bar over words (the opposite of underline)? Michael H Microsoft Word Help 1 February 8th 05 02:37 PM


All times are GMT +1. The time now is 09:18 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"