View Single Post
 
Old 08-04-2019, 07:12 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,600
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub Demo()
Dim oRng As Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .ClearFormatting
    .Text = "/\*{1}*/\*{1}"
    .MatchWildcards = True
    While .Execute
      oRng.Start = oRng.Start + 2
       oRng.End = oRng.End - 2
      oRng.Style = ActiveDocument.Styles("Strong") 'replace with your style
      oRng.End = oRng.End + 2
      oRng.Collapse wdCollapseEnd
     Wend
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote