我想替换Selection.Text
的值,但它不起作用。值是 ^ p ^ p [笑声] ,我想用软回车(^ l)替换回车符(^ p)所以我使用了{{1}但它不起作用,它不会取代它。
答案 0 :(得分:1)
录制宏让我知道:
With Selection.Find
.Text = "^p"
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
您可能不需要MatchSoundsLike
。 : - )
或者按照您最初的想法,尝试:
Selection.Text = Replace(Selection.Text,chr(13),chr(11))