如何用word 批量替换
譬如,现有一大堆杂乱无章的数字,093849528734....83942(共20多页)我想把奇数13579分别替换成X把偶数24680分别替换成Y现在替换的时候,需要输...
譬如,现有一大堆杂乱无章的数字,093849528734....83942(共20多页)
我想把奇数13579分别替换成X
把偶数24680分别替换成Y
现在替换的时候,需要输入1,替换成X;3全部替换成X;5全部替换成X;7全部替换成X;9全部替换成X;需要一个一个手动输入。如何能批量把13579分别替换成X? 展开
我想把奇数13579分别替换成X
把偶数24680分别替换成Y
现在替换的时候,需要输入1,替换成X;3全部替换成X;5全部替换成X;7全部替换成X;9全部替换成X;需要一个一个手动输入。如何能批量把13579分别替换成X? 展开
博思aippt
2024-07-20 广告
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT...
点击进入详情页
本回答由博思aippt提供
展开全部
把以下的代码(用宏录制的)copy到VBA中(就是按ALT+F11后,双击左面的PROJECT或THIS DOCUMENT,这时右面就会出现代码窗口)点保存,再回到你的WORD文档,按ALT+F8后运行就OK了
Sub MHR1()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "1"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "3"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "5"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "7"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "9"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "2"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "4"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "6"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "8"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "0"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Sub MHR1()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "1"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "3"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "5"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "7"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "9"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "2"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "4"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "6"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "8"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "0"
.Replacement.Text = "y"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Sub Macro2()
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[13579]"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "[24680]"
.Replacement.Text = "y"
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Text = ""
Selection.Find.Replacement.Text = ""
Selection.Find.MatchWildcards = False
End Sub
最后擦痕。
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[13579]"
.Replacement.Text = "x"
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "[24680]"
.Replacement.Text = "y"
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Text = ""
Selection.Find.Replacement.Text = ""
Selection.Find.MatchWildcards = False
End Sub
最后擦痕。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2021-01-25 · 百度认证:上海萌格电子商务官方账号
风云格式助手
一家专注软件研发的互联网科技公司,继承了研发与市场团队在海外共享软件 10 余年技术积累和市场经验,旗下有风云PDF转换器,风云CAD转换器,风云压缩等专业办公软件,也研发各类数字创意类软件
向TA提问
关注
展开全部
在我们日常工作和日常学习中,有时候需要将一些Word 文件进行压缩,如何做到呢?我们可以使用[风云压缩]完成。一起来看下具体步骤吧!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |