#1
|
||||
|
||||
Incrementing a style one number at a time
Hi friends!
I was wondering if there is an *easy and elegant* way to automate this (if there isn't I just do it manually at the end) I have text formatted (the text is simply a placeholder like"%%") with a style named styRunningNo. I want Word to compute how many times this style is in the document for each occurrence and give it a number representing that time of occurrence. So if there are 3 assurances to this instance it will replace %% with the number 4 and if I add another instance of that style it will replace the last instance with the number 5. etc. Thank you all in advance! Susan |
#2
|
|||
|
|||
Hi Susan,
Assign the style to a level in a MultiLevel List. The number will be at the beginning of the line. If you use automatic paragraph numbering or bullets read Shauna Kelly's directions on numbering and bullets. Start with How to create numbered headings or outline numbering in Word 2007 and Word 2010. For large documents you must follow these directions or you will lose your hair! (Mac version: Outline Numbering in Word for macOS - Best Practices - Brandwares) This may seem a bit convoluted at first, but it really is not. Just follow the steps. Shauna Kelly's instructions use the built-in heading styles, but you can use any existing paragraph styles including your custom styles. There are, however advantages to using the built-in heading styles when you create a Table of Contents. Here are some more advantages: Why Use Word's Built-In Heading Styles? by Shauna Kelly Note, you can modify these built-in styles to look exactly the way you want. Videos on this https://www.youtube.com/watch?v=He_ob8ydc9E https://www.youtube.com/watch?v=qbyTcWo52G4 https://www.youtube.com/watch?v=GevZOS-nCuw https://www.youtube.com/watch?v=niD6VXPvAyU The basic idea is that the numbering is set using the Define MultiLevel List dialog with each numbering level being attached to an existing paragraph style. Once you have this set up, you should not use the buttons for numbering in the Ribbon but rather apply the appropriate style for that level. You can save a document with this as a template for future documents if you want so you will not need to do this every time. |
#3
|
||||
|
||||
I like Charles' lateral thinking with a style change to include a paragraph number. That looks like a really good way to approach the question.
If you wanted the number to replace the %% then I would replace those with a Seq field and then update the fields to see these increment. To do this: 1. Create a field by typing the following line, selecting it and pressing Ctrl-F9 Seq styRunningNo 2. Select that field and Cut it by pressing Ctrl-X 3. Open the Replace dialog and replace all with the following settings Find %% Replace ^c 4. Update all fields
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a number style that incorporates heading number? | SDwriter | Word | 4 | 10-29-2020 12:15 PM |
Custom auto incrementing integer prefixes on headers | ritmo2k | Word | 2 | 03-09-2018 06:39 AM |
Auto Incrementing source for data validation | OfficeTemp99 | Excel | 1 | 05-13-2015 06:36 AM |
Help with incrementing Spinbutton value. | dlowrey | Excel Programming | 3 | 11-24-2013 12:28 PM |
multiply by incrementing by 5s | marynomore | Excel | 2 | 03-27-2013 05:36 AM |