Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
abc[_2_] abc[_2_] is offline
external usenet poster
 
Posts: 20
Default convert a numbered list to a multilevel list

Hi all

I have started writing a document using a numbered list like

1. text
text
2. text
text
3. text
text

is there a way to convert that list to a multi-level list so that i can
have something like

1. text
text
1.1 text
text
2. text
text
3. text
text

?

Thanks!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default convert a numbered list to a multilevel list

How would any method know that your

2. Text

was to become

1.1 Text

and that

3. Text

was to become

2. Text

and so on?

Or, did you just give a bad example?

If your text is separated from the numbers by a tab stop and you associated
the numbering that you want to use with Heading styles

(See the following page of fellow MVP Shauna Kelly's website -
http://www.ShaunaKelly.com/word/numb...Numbering.html

Running a macro containing the following code will convert the first level
of numbering to Heading 1 style

Dim drange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="[0-9]{1,}.^9", Forward:=True, _
MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True
Set drange = Selection.Range
drange.Text = ""
drange.End = drange.Paragraphs(1).Range.End
drange.Style = "Heading 1"
Loop
End With

For the second level, replace

"[0-9]{1,}.^9"

with

"[0-9]{1,}.[0-9]{1,}.^9"

and the Heading 1 with Heading 2

and for the third level you would use

"[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.^9"

For an explanation of what is being looked for, see the following page of
fellow MVP Graham Mayor's website

http://www.gmayor.com/replace_using_wildcards.htm

--
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

"abc" wrote in message ...
Hi all

I have started writing a document using a numbered list like

1. text
text
2. text
text
3. text
text

is there a way to convert that list to a multi-level list so that i can
have something like

1. text
text
1.1 text
text
2. text
text
3. text
text

?

Thanks!



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
abc[_2_] abc[_2_] is offline
external usenet poster
 
Posts: 20
Default convert a numbered list to a multilevel list

Hi,

Thanks for your answer.

I think I did not explain well what my scenario is:

I already have a Numbered List, that I created using the Numbered List
button (Word 2007).

So the numbers that appear at the beginning of some lines of my text are
automatically assigned by Word.

Whenever I press ENTER at the end of one automatically numbered line,
say (n) I get a new line numbered (n+1).

What I would like to do now is to convert the lines that are already
automatically numbered as a flat list, into what word calls a
"multilevel list", a list where I can create lines that are
automatically numbered as 1.1.1 1.1.2 etc.

Is there a way to convert the lines that are already numbered as flat
into multilevel. Even doing that on a line-by-line basis would be OK.

Example: I highlight numbered list line "1. INTRODUCTION" then do
something in Word that converts that line from item # 1 of a numbered
list into item # 1.0.0 of a multilevel list.

Is there a way to do that?

Thanks!





Doug Robbins - Word MVP wrote:
How would any method know that your

2. Text

was to become

1.1 Text

and that

3. Text

was to become

2. Text

and so on?

Or, did you just give a bad example?

If your text is separated from the numbers by a tab stop and you associated
the numbering that you want to use with Heading styles

(See the following page of fellow MVP Shauna Kelly's website -
http://www.ShaunaKelly.com/word/numb...Numbering.html

Running a macro containing the following code will convert the first level
of numbering to Heading 1 style

Dim drange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="[0-9]{1,}.^9", Forward:=True, _
MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True
Set drange = Selection.Range
drange.Text = ""
drange.End = drange.Paragraphs(1).Range.End
drange.Style = "Heading 1"
Loop
End With

For the second level, replace

"[0-9]{1,}.^9"

with

"[0-9]{1,}.[0-9]{1,}.^9"

and the Heading 1 with Heading 2

and for the third level you would use

"[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.^9"

For an explanation of what is being looked for, see the following page of
fellow MVP Graham Mayor's website

http://www.gmayor.com/replace_using_wildcards.htm

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default convert a numbered list to a multilevel list

You'll need to create the multilevel list and link it to specific styles,
then apply the appropriate style to the subordinate members of the list.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"abc" wrote in message ...
Hi,

Thanks for your answer.

I think I did not explain well what my scenario is:

I already have a Numbered List, that I created using the Numbered List
button (Word 2007).

So the numbers that appear at the beginning of some lines of my text are
automatically assigned by Word.

Whenever I press ENTER at the end of one automatically numbered line,
say (n) I get a new line numbered (n+1).

What I would like to do now is to convert the lines that are already
automatically numbered as a flat list, into what word calls a "multilevel
list", a list where I can create lines that are automatically numbered as
1.1.1 1.1.2 etc.

Is there a way to convert the lines that are already numbered as flat into
multilevel. Even doing that on a line-by-line basis would be OK.

Example: I highlight numbered list line "1. INTRODUCTION" then do
something in Word that converts that line from item # 1 of a numbered list
into item # 1.0.0 of a multilevel list.

Is there a way to do that?

Thanks!





Doug Robbins - Word MVP wrote:
How would any method know that your

2. Text

was to become

1.1 Text

and that

3. Text

was to become

2. Text

and so on?

Or, did you just give a bad example?

If your text is separated from the numbers by a tab stop and you
associated the numbering that you want to use with Heading styles

(See the following page of fellow MVP Shauna Kelly's website -
http://www.ShaunaKelly.com/word/numb...Numbering.html

Running a macro containing the following code will convert the first
level of numbering to Heading 1 style

Dim drange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="[0-9]{1,}.^9", Forward:=True, _
MatchWildcards:=True, Wrap:=wdFindStop, MatchCase:=False) = True
Set drange = Selection.Range
drange.Text = ""
drange.End = drange.Paragraphs(1).Range.End
drange.Style = "Heading 1"
Loop
End With

For the second level, replace

"[0-9]{1,}.^9"

with

"[0-9]{1,}.[0-9]{1,}.^9"

and the Heading 1 with Heading 2

and for the third level you would use

"[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.^9"

For an explanation of what is being looked for, see the following page of
fellow MVP Graham Mayor's website

http://www.gmayor.com/replace_using_wildcards.htm



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
Save numbered list with ordered list tags RB Microsoft Word Help 3 April 2nd 08 11:21 AM
How would I change a numbered list to an alphabetical list? (Word coolpop Microsoft Word Help 2 July 24th 07 07:42 PM
Word 2007 Multilevel list - This list name is already being used. Please choose another one. robr Microsoft Word Help 3 June 29th 07 06:27 PM
Converting unumbered list to Numbered List Crockett Microsoft Word Help 1 November 7th 06 02:56 PM
Table of contents like list for a numbered list of items Ben K. Bullock New Users 2 March 2nd 06 12:52 PM


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