Re: Bold every second line
- From: Kanga 85 <Kanga85@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 3 Jan 2009 00:53:00 -0800
In case you've got line-feeds at the end of each logical line, try something along the lines of:
Dim oRng As Range
Dim i As Long
.Text = "^l"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
For i = 1 To .Paragraphs.Count
If i Mod 2 = 0 Then
.Paragraphs(i).Range.Bold = True
.Paragraphs(i).Range.Bold = False
.Text = "^p"
.Replacement.Text = "^l"
.Text = "^l^p"
.Replacement.Text = ""
[MVP - Microsoft Word]
"Kanga 85" <Kanga85@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:B5329F24-1109-4E7A-AA17-B37D3E25F855@xxxxxxxxxxxxxxxx
I actually want lines rather than paragraphs, but I should be able to modify
your macro (or my docu,ment).
"Kanga 85" wrote:
I have a long list, and would like to bold every second line of the whole
document. I need a macro because new entries will be inserted at various
points and so muck up any original formatting.
Thanks in advance,
- Prev by Date: Re: Bold every second line
- Next by Date: Re: format part of a TextBox content
- Previous by thread: Re: Bold every second line
- Next by thread: RE: Unable to get complete word doc for second time using VBA from PPT