List styles and paragraph formatting at the same time?

G

Guest

Hi,

I'm trying to create a list style which should have the proper hanging
indent automatically, but I can only apply either the list style (which has
no paragraph formatting option) or the paragraph style (which does have it),
so I always have to add the indentation manually. Is there any workaround for
this? And is it available in Word 2003 compatibility mode?
(Using Word 2007)

Thanks.
 
S

Suzanne S. Barnhill

Indents in list styles are set as part of the numbering.

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

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Stefan Blom

But note that you can also apply a paragraph style to each level of
numbering (by attaching the numbering levels of the list style to paragraph
styles).

This is done via the Modify Multilevel List dialog box. To display this
dialog box, do the following: Right-click the list style name in Home tab |
Multilevel List. Choose Modify. Click Format and then click Numbering. (You
may have to click the More button to see all options.)

--
Stefan Blom
Microsoft Word MVP


in message
 
G

Guest

Can I apply only a paragraph style the to the levels or is it possible to
apply a charachter style or a linked style? By the way, can I transform
linked styles into a paragraph style in order to assign it to the specific
level? I tried it but without success. I had to remove the linked style and
recreate it as paragraph style.
 
S

Stefan Blom

Paragraph styles as well as linked (paragraph and character) styles can be
attached to levels of a list style. But note that attaching a style doesn't
automatically apply it to text.

--
Stefan Blom
Microsoft Word MVP


in message
 
G

Guest

Ok, I found out the following:
- if I simply link it to a style, it doesn't automatically change.
- if I type something, and apply the list style, it automatically changes
the style to the linked one.
- if I format somthing for that style, it automatically gets the list style,
outline level and the numbering
but: how do I apply the style to for example all text on level 3 after
linking StyleWhatever to that level?
 
S

Stefan Blom

in message
Ok, I found out the following:
- if I simply link it to a style, it doesn't automatically change.
- if I type something, and apply the list style, it automatically changes
the style to the linked one.
- if I format somthing for that style, it automatically gets the list
style,
outline level and the numbering

Indeed, this is what happens. :)
but: how do I apply the style to for example all text on level 3 after
linking StyleWhatever to that level?

Assuming that there is only one multilevel list in the document, you should
be able to use the following macro:

Sub Testing()
Dim p As Paragraph
For Each p In ActiveDocument.Paragraphs
If p.Range.ListParagraphs.Count = 1 Then
Select Case p.Range.ListFormat.ListLevelNumber
Case 1
p.Style = wdStyleHeading1
Case 2
p.Style = wdStyleHeading2
Case 3
p.Style = wdStyleHeading3
Case 4
p.Style = wdStyleHeading4
Case 5
p.Style = wdStyleHeading5
Case 6
p.Style = wdStyleHeading6
Case 7
p.Style = wdStyleHeading7
Case 8
p.Style = wdStyleHeading8
Case 9
p.Style = wdStyleHeading9
End Select
End If
Next p
End Sub

The macro applies Heading 1 to all level 1 numbering, Heading 2 to all level
2 numbering, and so on.

If you don't want to use the heading styles, make the necessary changes. For
example, if level 6 should apply a style named "test," change p.Style =
wdStyleHeading6 to:

p.Style = "test"

If you decide to use the macro, rather than to apply the styles manually,
you may want to test it on a copy of the document first, just in case.
 
G

Guest

Thanks for the detailed info. I'm not very familiar with macros yet, but
thanks for the effort, I'll try to make some use of it :)
 
S

Stefan Blom

Well, as I wrote, if you want to try it, do so on a copy of the document.
But since the macro has limitations, you may prefer to apply the styles
manually. Doing so will definitely give you more control over the
formatting.

--
Stefan Blom
Microsoft Word MVP


in message
 

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