Formatting chapter numbers

N

Nahshon Evren

Hi,

when I extract a piece of text from a longer text
and place it in a new document under WordXP
the chapter numbering resets from for example
1.2.3.4.5 to 1.1.1.1.1 - when I pass the mouse over the
original numbers that I'd like to conserve they seem shaded,
how can I stop this renumbering from the beginning and
conserve the original numbering ?

Thanks to all,

Nash
 
J

Jezebel

I don't know of an elegant way to do this, but this works --

1. Select the text you want to copy.
2. Press Alt-F11 to switch to VBA.
3. In the Immediate window (bottom right), type:
Selection.FormattedText.ListFormat.ConvertNumbersToText
4. Copy your text.
5. Press Undo to reverse the conversion to plain text.
 
L

Lene Fredborg

If you often need to copy text from one document and paste it into another
document with the numbering unchanged, you could use a macro to perform the
copying steps that are required. If you assign the macro to a toolbar button
or a keyboard shortcut, it is as fast to execute as a normal copy.

You can use the macro below. The actions performed by the macro correspond
to the steps described by Jezebel in the previous post, i.e. the macro:
- changes automatically generated numbers (in headings, lists) in the
selected text to normal text so that the numbers do not change when pasted
into another document
- copies the text
- undoes the change in the original document

If you use the macro to copy the desired text, you only need to go to the
destination document and select paste (Ctrl+V).

Note:
If you reapply a numbered style to a paragraph that has been changed by the
macro, the paragraph will have two numbers: an automatically applied number
plus the "old" number that was converted to normal text (must be corrected
manually).
It is always a good idea to create a backup copy of your original document
in case problems should occur.


The macro:

Sub CopySelection_PreserveNumbersWhenPasting()
Dim oRange As Range

Set oRange = Selection.Range
'Unlink heading numbers in range
With oRange
.ListFormat.ConvertNumbersToText wdNumberParagraph
.Copy
End With
'Undo the change
ActiveDocument.Undo

Set oRange = Nothing

End Sub

--
Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word
 
S

Stefan Blom

Another method is to copy the text and then, on the Edit menu, click
Paste Special. Choose to paste as "Unformatted Text."

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
N

Nahshon Evren

I'll try that thanks


Jezebel said:
I don't know of an elegant way to do this, but this works --

1. Select the text you want to copy.
2. Press Alt-F11 to switch to VBA.
3. In the Immediate window (bottom right), type:
Selection.FormattedText.ListFormat.ConvertNumbersToText
4. Copy your text.
5. Press Undo to reverse the conversion to plain text.
 
N

Nahshon Evren

Thanks Lene and Stefan I'll try these ideas



Stefan Blom said:
Another method is to copy the text and then, on the Edit menu, click
Paste Special. Choose to paste as "Unformatted Text."

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