PC Review


Reply
Thread Tools Rate Thread

Alternate lines in Bold

 
 
Nikhil
Guest
Posts: n/a
 
      7th Jun 2008
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
 
Reply With Quote
 
 
 
 
StevenM
Guest
Posts: n/a
 
      7th Jun 2008
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

"Nikhil" wrote:

> 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

 
Reply With Quote
 
StevenM
Guest
Posts: n/a
 
      7th Jun 2008
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.
 
Reply With Quote
 
Suzanne S. Barnhill
Guest
Posts: n/a
 
      7th Jun 2008
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.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"Nikhil" <(E-Mail Removed)> wrote in message
news:2297884F-F3E1-473F-9930-(E-Mail Removed)...
>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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternate Shading for non-bold rows andreashermle Microsoft Excel Programming 1 25th Mar 2010 11:34 AM
Alternate rows with bold font *Glen* Microsoft Access Reports 22 31st Dec 2009 06:25 PM
Alternate rows using bold font *Glen* Microsoft Access 2 29th Dec 2009 01:55 PM
Alternate between normal & bold text *Glen* Microsoft Access 0 29th Dec 2009 12:43 AM
2007: Retrieving bold lines as lines in Table of Contents Pekka Numminen Microsoft Word Document Management 8 21st Sep 2008 03:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:06 AM.