View Single Post
 
Old 12-30-2020, 01:52 PM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,636
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Hyperlink is a character style so I don't really know why you would have applied it to the paragraph marks in the first place:

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
  Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "^p"
    .Style = "Hyperlink"
    While .Execute
      oRng.Select
      Selection.ClearCharacterAllFormatting
      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