软件:office word
版本:2013
各位先进好,最近小弟在设定宏的时候有一些问题想请问一下该如何解决
┌─────────┐
│AAA aaaaa │
│BBB bbbb │
│CCC CCCCcccc │
└─────────┘
┌─────────┐
│AAA aaaaa │
│BBB vvvvv │
│CC ccc cccc │
└─────────┘
因为工作需要,常要用到删掉段落标示以及空格
之前在word 2007设定好后,都可以依照自己所选择的表格完成
但在word 2013要重新设定时,每当选择只跑上面的表格时,下方的表格也会跟着自己动
不知道是不是有哪里设定错误?
以下是直接把VBA码直接贴上来
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " "
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub