Alternate lines in Bold

N

Nikhil

I have a conversation that runs into several pages.

The conversation goes like this:

M: Do you like watching television?
R: No, I hate it. I love watching movies, nevertheless.

M: What kind of movies do you watch?
R: I like to watch action movies

and so on.....

My problem is : I want all lines that are spoken by M (M:) to be highlighted
in bold.

Can someone help me?

Nikhil
 
S

StevenM

Mikhil,

The following macro will take care of your task. If you need help installing
this macro, just ask.

'
' BoldParagraphsBeginningWith
' In Word, every line is a paragraph.
' One can also use this macro to un-bold by
' changing "True" to "False" and running it again.
' If you need to search for something else,
' you can change what is in the quotes
' following "sFind =".
'
Sub BoldParagraphsBeginningWith()
Dim oPara As paragraph
Dim sFind As String

sFind = "M:"

For Each oPara In ActiveDocument.Paragraphs
If Left(oPara, Len(sFind)) = sFind Then oPara.Range.Bold = True
Next oPara
End Sub

Steven Craig Miller
 
S

StevenM

The line:

' In Word, every line is a paragraph.

Should have read:

' In Word, every line ending with a paragraph mark
' (no matter how short) is a paragraph.
 
S

Suzanne S. Barnhill

Create different paragraph styles for the two conversationalists, one bold,
one not. Apply the bold style to M's speeches. When typing such dialog, it
will be helpful to have the styles alternate, so make each style the "Style
for following paragraph" of the other.

Since you appear to be doing this after the fact, however, you will probably
need to use Find and Replace. It would still be helpful to apply a style
rather than direct formatting. At the simplest level:

1. Press Ctrl+H to open the Replace dialog.

2. Click More and check the box for "Use wildcards."

3. In the "Find what" box, type

M:*^13


4. In the replace with box, press Ctrl+B.

5. Click Replace All.

In step 4, instead of applying Bold formatting, you could click Format and
select the bold style you have created.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top