Remove a specified number of characters from the right or left side of text

I know that in Excel you can remove a specified number of characters from the right or left side of text.  Can you do that in Word as well?  Basically, I'm editing a document that someone's manually numbered paragraphs.  Instead of manually going through them and deleting them, I'm wondering if there's a way of highlighting the paragraphs I'd like to edit and removing the first 4 characters (the two numbers, the period, and the tab) so I can then number them using the numbering tool. 

 

Is there a way? 

 

Thanks,

Dax  

Answer
Answer
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
Dim oPar As Paragraph
For Each oPar In ActiveDocument.Range.Paragraphs
  Set oRng = oPar.Range
  oRng.Collapse wdCollapseStart
    Do While oRng.Characters.Last Like "[1-9.^t]"
      oRng.MoveEnd wdCharacter, 1
    Loop
    If Len(oRng) > 1 Then oRng.Delete
Next oPar
End Sub
Greg Maxey
***
Death smiles at us all, but all a man can do is smile back.


For more help with Word visit:
http://gregmaxey.com/word_tips.html

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 5, 2021 Views 893 Applies to: