View Single Post
 
Old 01-02-2017, 10:10 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by bobbyrjw View Post
I have a 20k word story that has been edit-chopped.
I want VBA to find each instance of the word "Chapter" and add a number that increments on each iteration, or "find". and I want to change the style to heading 1.
You might not want to do that if there's a cross-reference somewhere pointing to a different chapter. Besides which, there's a better way.

Assuming you want to use Heading 1 only for Chapter titles, you can assign a multi-level list number to that Style and prefix the list-level number with the word 'Chapter'. Then simply find the chapter headings and apply the Heading 1 Style to them - the numbering will take care of itself (even if you do further edits).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote