I modified a code I use to get rid of leading tabs but it kills all in whole document not just leading. I'm wondering if it can be modified to delete certain other leading text? sometimes I need to go through hundreds of paragraphs to delete text that is there before a number. example: NCA-1000 and delete it (NCA-). sometimes it may NF-2300 in each case I need to delete the letters before the numbers. The catch is that there are other occurrences in the document where I do not want to delete the prefix (It's a reference to another clause). I suppose ideally an input box where I could enter what I what to delete (leading characters) followed by the option of do I want to delete this one? would be amazing. I tried the recorder, tried searching and can't find anything close to this. Any help or guidance appreciated.
Sub RemoveLeadingCharacters() If ActiveDocument.Range(0, 1).Text = "NCA-" Then ActiveDocument.Range(0, 1).Delete End If With ActiveDocument.Content.Find .ClearFormatting .Replacement.ClearFormatting .Text = "NCA-" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Replace:=wdReplaceAll End With End Sub