Piecevcake Asked: 2019-08-07 15:29:06 +0800 CST2019-08-07 15:29:06 +0800 CST 2019-08-07 15:29:06 +0800 CST Word 2007 VBA 宏从多个超链接中删除段落标记(显示文本) 772 有没有人有一个宏可以删除段落标记,只能从我所有的超链接内部(而不是从超链接外的普通文本中删除)? 这是将文本从许多网站复制到 MS Word 中的常见问题(但许多其他网站不这样做!)。 microsoft-word vba 1 个回答 Voted Best Answer Piecevcake 2019-11-29T09:44:23+08:002019-11-29T09:44:23+08:00 感谢提供线索的 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
感谢提供线索的 Tanya-