I've run into a problem with a macro I have developed (with help from very kind people on here also). Please see image of before and after the macro is run.
The macro should insert a tab at the beginning of paragraphs that start with (a), (i) (1), a), 1), 100 etc. The macro runs fine except when the paragraph starts with a number. Can anyone help with the code below to insert a tab before a number (please note this is just an extract from the main macro). Thanks, Shelley
Code:
'insert tab at beginning of paragraph with a bracket e.g. (a), (i), (1)
With oRng.Find
.Text = "^p("
.Replacement.Text = "^p^t("
.Execute Replace:=wdReplaceAll
End With
'insert tab at beginning of paragraph e.g a), 1), i), 100 etc.
With oRng.Find
.Text = "[^p]\([a-zA-Z0-9][)]"
.Replacement.Text = "^p^t"
.Execute Replace:=wdReplaceAll
End With