![Word 2007 VBA 宏从多个超链接(显示文本)中删除段落标记](https://linux22.com/image/1599779/Word%202007%20VBA%20%E5%AE%8F%E4%BB%8E%E5%A4%9A%E4%B8%AA%E8%B6%85%E9%93%BE%E6%8E%A5%EF%BC%88%E6%98%BE%E7%A4%BA%E6%96%87%E6%9C%AC%EF%BC%89%E4%B8%AD%E5%88%A0%E9%99%A4%E6%AE%B5%E8%90%BD%E6%A0%87%E8%AE%B0.png)
答案1
感谢 Tanya 提供的线索-
Sub D___Hyperlinks_ParaMarksReplWithSpaces()
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Hyperlink")
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.text = "^p"
.Replacement.text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
With Selection.Find
.text = "^l"
.Replacement.text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With