For example:
Code:
Sub Demo()
Application.ScreenUpdating = False
With ActiveDocument
With .Range
.Font.Hidden = True
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Format = False
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
.Text = "Section 1.10.32*voluptatem.^13"
.Replacement.Text = "^&"
.Replacement.Font.Hidden = False
.Execute Replace:=wdReplaceAll
.Replacement.ClearFormatting
.Font.Hidden = True
.Format = True
.Text = "*"
.Replacement.Text = ""
.Execute Replace:=wdReplaceAll
End With
End With
End With
Application.ScreenUpdating = True
End Sub
Quote:
Originally Posted by NameIsJustAnIllusion
There is no fixed text as I mentioned in the question. It is more about start position or end position. I have these start position or end position as numbers and not text. The text/character at the start position can be a "Space" or a "Full Stop". So I can't find it or am I missing something here?
|
So how do you know what the starting position & end position are if you don't know what the content is?