View Single Post
 
Old 08-13-2024, 08:57 AM
Shelley Lou Shelley Lou is offline Windows 10 Office 2016
Expert
 
Join Date: Dec 2020
Posts: 259
Shelley Lou is on a distinguished road
Default VBA Format manual numbering so auto numbering code can run

Hi Vivka, OMG thanks so much for the updated code and thank you for adding comments, it makes it so much easier to read/understand - thank you for taking the time.

I'm just adding one last thing to the end of the code where the code is inserting a tab after an opening bracket - I added code to remove the tab but it only appears to remove the first instance (in the image at (a)) and not the rest (from (b) onwards) - have I not got the replacement text correct?

Code:
 'Delete tab after opening bracket:
        .text = "^13[\(]^t"
        .Replacement.text = "^p\1("
        .Execute Replace:=wdReplaceAll
Capture.JPG

Format manual numbering with brackets.docx
Reply With Quote