Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
Find and Replace
I have a long, long document that is in unformatted text. Headings
containing not more than 10 words precede the first paragraph under each heading. The paragraphs in each case contain more than 10 words. I'm just wondering . . . . How can I find a heading (a line of text with less than 10 words) preceded by a paragraph mark and followed by a paragraph mark and change the font to bold in each case? I have plenty of time to do it the long way around, but I just love what you wonderful people have to say about my favorite subject--Find and Replace. I tried finding a "paragraph followed by 1 to 10 words followed by a paragraph." I must have done something wrong, though, because it keeps saying it cannot find it. Thanks for all your help--past, present and future! I admire you folks so very, very much. |
#2
Posted to microsoft.public.word.newusers
|
|||
|
|||
Find and Replace
Use a macro containing the following commands:
Dim i As Long With ActiveDocument For i = 1 To .Paragraphs.Count - 1 If .Paragraphs(i).Range.Words.Count 10 Then If .Paragraphs(i + 1).Range.Words.Count 10 Then .Paragraphs(i).Range.Font.Bold = True End If End If Next i 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 "Island Girl" wrote in message ... I have a long, long document that is in unformatted text. Headings containing not more than 10 words precede the first paragraph under each heading. The paragraphs in each case contain more than 10 words. I'm just wondering . . . . How can I find a heading (a line of text with less than 10 words) preceded by a paragraph mark and followed by a paragraph mark and change the font to bold in each case? I have plenty of time to do it the long way around, but I just love what you wonderful people have to say about my favorite subject--Find and Replace. I tried finding a "paragraph followed by 1 to 10 words followed by a paragraph." I must have done something wrong, though, because it keeps saying it cannot find it. Thanks for all your help--past, present and future! I admire you folks so very, very much. |
#3
Posted to microsoft.public.word.newusers
|
|||
|
|||
Find and Replace
Doug, thanks for this and all the help you've given me through the months (or
is it years?)! "Doug Robbins - Word MVP" wrote: Use a macro containing the following commands: Dim i As Long With ActiveDocument For i = 1 To .Paragraphs.Count - 1 If .Paragraphs(i).Range.Words.Count 10 Then If .Paragraphs(i + 1).Range.Words.Count 10 Then .Paragraphs(i).Range.Font.Bold = True End If End If Next i 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 "Island Girl" wrote in message ... I have a long, long document that is in unformatted text. Headings containing not more than 10 words precede the first paragraph under each heading. The paragraphs in each case contain more than 10 words. I'm just wondering . . . . How can I find a heading (a line of text with less than 10 words) preceded by a paragraph mark and followed by a paragraph mark and change the font to bold in each case? I have plenty of time to do it the long way around, but I just love what you wonderful people have to say about my favorite subject--Find and Replace. I tried finding a "paragraph followed by 1 to 10 words followed by a paragraph." I must have done something wrong, though, because it keeps saying it cannot find it. Thanks for all your help--past, present and future! I admire you folks so very, very much. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find multiple characters in one find using MSword find/replace | Microsoft Word Help | |||
Trying to replace words with fields using Find/Replace | Microsoft Word Help | |||
Using find and replace or macros to replace page ranges | Microsoft Word Help | |||
Find/ Replace is auto-capping the words I want to replace with | Microsoft Word Help | |||
Find and Replace: delete a line & find a number 10 | Microsoft Word Help |