paragraph style with 1st sentence different

E

ezra abrams

can i use styles to create a paragraph that has just the first sentence bold ?
I need something similar to a std normal style, but with just the first
sentence changed
 
J

Jay Freedman

ezra said:
can i use styles to create a paragraph that has just the first
sentence bold ? I need something similar to a std normal style, but
with just the first sentence changed

A single style can apply only one set of formatting. You can apply a
paragraph style, and then apply a character style (such as the Strong style,
which adds bold) to part of the paragraph, but it's two separate steps.

As a one-step solution, you can install a macro such as the following (see
http://www.gmayor.com/installing_macro.htm) and assign it to a toolbar
button or a keyboard shortcut.

Sub FirstSentenceBold()
Dim oRg As Range
Set oRg = Selection.Paragraphs(1).Range
With oRg
.Style = ActiveDocument.Styles("Body Text")
.Sentences(1).Style = ActiveDocument.Styles("Strong")
End With
End Sub

You can put in the names of different styles in quotes.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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