View Single Post
 
Old 05-05-2021, 09:51 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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 View Post
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?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote