#1
|
|||
|
|||
VBA insert period after manual numbering
When converting pdfs to word, more often than not the manual numbering that will become Heading 1 is often missing the full stop/period and because it is missing, I can't run my auto numbering macro. I'm trying to find a way to insert a period for manual numbers that do not already contain a period e.g. 1, 2, 10, 100 but not for 1.1, 1.1.1, 1.1.1.1 – I've tried many ways to do a find and replace but nothing seems to be working – can anyone help at all – many thanks
add period to manual number.docx |
#2
|
|||
|
|||
VBA insert period after manual numbering
So I think I've figured out the find and replace finally.
Capture.JPG Code:
Sub AddFullStop() Application.ScreenUpdating = False Selection.HomeKey Unit:=wdStory With Selection.Find .ClearFormatting .Forward = True .Wrap = wdFindContinue .Format = True .MatchWildcards = True .Replacement.ClearFormatting .text = "(^13)([0-9]@)([ ^t])" .Replacement.text = "\1\2.\3" .Execute Replace:=wdReplaceAll End With Application.ScreenUpdating = True End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA Remove manual numbering after Outline numbering | Shelley Lou | Word VBA | 2 | 08-04-2021 12:24 AM |
VBA converting manual numbering to auto numbering | Shelley Lou | Word VBA | 8 | 05-28-2021 01:08 AM |
page numbering for manual | Bursal | Word | 1 | 07-29-2018 02:08 PM |
Insert manual page breaks | Crowdie | Word | 5 | 07-31-2015 07:36 AM |
Insert a period between cells? | nikknock | Word Tables | 1 | 10-16-2014 02:47 PM |