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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find multiple characters in one find using MSword find/replace Cliff Microsoft Word Help 2 October 29th 06 07:48 PM
Trying to replace words with fields using Find/Replace mbleyle Microsoft Word Help 2 March 29th 06 11:35 PM
Using find and replace or macros to replace page ranges JeremyC Microsoft Word Help 7 February 13th 06 09:20 PM
Find/ Replace is auto-capping the words I want to replace with Graham Mayor Microsoft Word Help 8 January 27th 06 01:39 AM
Find and Replace: delete a line & find a number 10 Janis Anna Microsoft Word Help 3 October 23rd 05 05:53 AM


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