Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / January 2007

Tip: Looking for answers? Try searching our database.

Formatting chapter numbers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nahshon Evren - 29 Jan 2007 16:01 GMT
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
Jezebel - 29 Jan 2007 20:38 GMT
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.

> Hi,
>
[quoted text clipped - 9 lines]
>
> Nash
Nahshon Evren - 30 Jan 2007 17:07 GMT
I'll try that thanks

> I don't know of an elegant way to do this, but this works --
>
[quoted text clipped - 18 lines]
> >
> > Nash
Lene Fredborg - 29 Jan 2007 22:45 GMT
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

Signature

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

> Hi,
>
[quoted text clipped - 9 lines]
>
> Nash
Stefan Blom - 30 Jan 2007 12:44 GMT
Another method is to copy the text and then, on the Edit menu, click
Paste Special. Choose to paste as "Unformatted Text."

Signature

Stefan Blom
Microsoft Word MVP

> Hi,
>
[quoted text clipped - 9 lines]
>
> Nash
Nahshon Evren - 30 Jan 2007 17:08 GMT
Thanks Lene and Stefan I'll try these ideas

> Another method is to copy the text and then, on the Edit menu, click
> Paste Special. Choose to paste as "Unformatted Text."
[quoted text clipped - 16 lines]
> >
> > Nash
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.