Re: Highlighter Or Something Like that :-)
- From: "Graham Mayor" <gmayor@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 19 Apr 2009 10:50:13 +0300
Assuming that when imported into Word each line ends with a paragraph mark,
and there is an empty paragraph between each 'verse' then the following
macro will highlight all the sections with 5 or more paragraphs in yellow.
Sub HiLightFive()
Dim oRng As Range
Dim oTest As Range
Dim i As Long
Selection.HomeKey wdStory
Set oRng = ActiveDocument.Paragraphs(1).Range
For i = 1 To ActiveDocument.Paragraphs.Count
Selection.MoveDown wdLine
Set oTest = Selection.Paragraphs(1).Range
If Len(oTest) = 1 Then
oRng.End = oTest.Start
If oRng.Paragraphs.Count > 4 Then
oRng.HighlightColorIndex = wdYellow
End If
oRng.Start = oTest.End
End If
Next i
End Sub
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
eman wrote:
Hi,
Here under the line you can see a small part of subtitles of a movie.
As you can see there are paragraphs of 3, 4 and 5 short verses. For
example 1st paragraph is with 3 verses, 2nd is with 4 verse and the
5th is with 5 verses.
The 3rd paragraph is with 5 verses and it is wrong (for me). I want
only paragraphs with 3 and 4 verses.
What I am looking for is, if it is possible that Words can mark
automatically paragraphs with 5 verses for example with a color
instead of checking manually all the document, because subtitles of a
movie are very long!
Maybe it's impossible but I am just asking.
I always remember of Google highlighter, it is very usefull when you
are searching for a word because you can see the word colored easily.
Maybe there is something similar in Word.
Thanks in advance
_____________________________________________________
574
00:29:55,960 --> 00:29:58,087
I know. I have no idea.
575
00:29:58,163 --> 00:30:00,996
It's, like, the wrong time to let
the guy know that you're crazy.
576
00:30:01,065 --> 00:30:03,533
- You know what I mean? It's not how
I'd play it.
- Yeah.
.
- Follow-Ups:
- Re: Highlighter Or Something Like that :-)
- From: Graham Mayor
- Re: Highlighter Or Something Like that :-)
- References:
- Highlighter Or Something Like that :-)
- From: eman
- Highlighter Or Something Like that :-)
- Prev by Date: Re: Highlighter Or Something Like that :-)
- Next by Date: Re: Highlighter Or Something Like that :-)
- Previous by thread: Re: Highlighter Or Something Like that :-)
- Next by thread: Re: Highlighter Or Something Like that :-)
- Index(es):
Relevant Pages
|