Sharon is editing some old documents that have "hand numbered" paragraphs. If she adds automatic numbering to those paragraphs, Word still leaves the "hand numbering" numbers in place. She has many documents to process, and some of them are quite long. She wonders if there is a way to automatically get rid of the "hand numbering" numbers.
There are three ways you can approach this task. One is by editing, another is to use Find and Replace, and the third is to use a macro.
You can use regular editing techniques if your paragraphs are very short, meaning not over a single line each. All you need to do is to hold down the Alt key as you use the mouse to select the leading numbers and anything after them (like periods, spaces, or tabs). Press the Delete key, and just those leading characters are deleted.
For the Find and Replace method, follow these steps:
Figure 1. Getting ready to replace numbering.
There are a few things to note about this technique. First, it replaces any leading paragraph numbering that starts with an Arabic number (1, 2, 3, etc.) followed by a period and either a tab or space. If your "hand numbered" paragraphs don't follow this pattern, then you'll need to modify what you search for in step 4. For instance, if the numbering uses Roman numerals or letters then you'll need to change what you search for.
Second, the technique assumes that there are no leading spaces or tabs before the number at the beginning of the paragraph. If there might be, then you'll need to do a separate Find and Replace operation before this one in order to remove all leading spaces or tabs.
If you prefer to use a macro to do the conversion, the easiest way is to use an old WordBasic command that was never updated to VBA. Consider the following:
Sub RemoveManualNumbers() ActiveDocument.Range.Select WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1 End Sub
The macro selects the entire document and then uses the .ToolsBulletsNumbers method to get rid of the manual numbering. You can find out a bit more about this approach at the following Word MVP site page:
https://wordmvp.com/FAQs/Numbering/RemoveManualNumbers.htm
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9895) applies to Microsoft Word 2007, 2010, and 2013.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
If you have two characters in the wrong order, you might be interested in a shortcut you can use to switch their order. ...
Discover MoreThe Track Changes tool can be a great asset when you are working on a document with others. It can also be a hassle if ...
Discover MoreWhen you need to perform certain editing tasks over and over again, you start to look for ways to make your work faster ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-02-06 04:44:23
Ken
Here are some references
http://www.gmayor.com/replace_using_wildcards.htm
http://word.mvps.org/FAQs/General/UsingWildcards.htm
http://www.funduc.com/regexp.htm
2020-02-05 05:01:59
luigia
Hi, i'm processing a file and i need to find what is the code of the indexes of different heading so could someone tell me what is the meaning of each component of (^13)[0-9]{1,}.[^09^32] and if there is something like a tutorial? i tried to use the code in the example but i couldn't undestand why it didn't work
Thank you
2015-09-15 17:06:17
Pedro Belli
This is a very useful tip. I run into this problem very often and this tip is a real time saver.
Thanks a lot
2015-09-12 09:27:49
Karen Mezouane
Well, I've been following Word Tips for a while and there sure are some good tips in them - the comment about this tip was excellent too!
2015-09-12 06:25:29
Ken Endacott
The Find & Replace instructions given above will only remove simple numbering such as "1. ". It will leave in place any extra spaces or tabs. Also it will not remove numbering from the first paragraph in a table cell or textbox (or from the very first paragraph in the document).
The macro will remove both simple and outline numbering such as "1. " or "1.1.1." but it is indiscriminate and will remove any numbers that start a paragraph, which means that it will also remove a column of numbers such as:
43.61
27.45
38.92
The following is a Search & Replace method that is an improvement on the above but still has some caveats. If a paragraph starts with an Arabic number it will remove all subsequent characters up to the first alphabetic character. Therefore it will remove simple and outline numbering and even numbering such as "2)". The risk is that it will remove a column of numbers unless the numbers are preceded by a non numeric character such as a space or tab. Also it will not find numbering on the first paragraph of a table cell or textbox. Unless you are sure that the document contains no left justified columns of numbers it is best to not use Replace All but to prompt for each replacement.
Find what: "[^13][0-9]*([^13A-Za-z])"
Replace with "^p1"
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2021 Sharon Parq Associates, Inc.
Comments