View Single Post
 
Old 08-03-2018, 07:32 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

If you look at the main macro, you will see a section that appears green coloured. That code is commented out and does nothing. If you remove the apostrophes from the start of each green coloured line that code will be run along with the rest of the macro to renumber the chapters.


To add your fixed code (which should be bookmarked in the source template also) locate the line

Code:
Next oCC
and immediately after it add
Code:
 'Add this code
        Set oRng = oDoc.Range
        oRng.Collapse 0
        oRng.FormattedText = oSource.Bookmarks("The name of the bookmark with the fixed text").Range.FormattedText
Put the bookmark name of the fixed text where indicated.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote