如何用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?
展开
 我来答
mkw007
2012-05-30 · TA获得超过4267个赞
知道大有可为答主
回答量:6560
采纳率:55%
帮助的人:1607万
展开全部
打开替换对话框,单击高级,勾选使用通配符,在查找框中输入:[13579],在替换为框中输入:X,单击全部替换即可同理,在查找框中输入:[24680],替换为框中输入:Y,单击全部替换即可。不需要用到宏。如果自己经常做字符替换(建议可使用《文件批量处理百宝箱V8.0》中的批替换以及文本行处理的功能),还是自己多多学习学习word的通配符替换吧。 对于这个问题,如果要用大炮似的几十上百行宏代码,有点大炮打蚊子的感觉了,呵呵
博思aippt
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT... 点击进入详情页
本回答由博思aippt提供
jiyagao
2012-05-29 · TA获得超过370个赞
知道小有建树答主
回答量:631
采纳率:0%
帮助的人:189万
展开全部
把以下的代码(用宏录制的)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
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
天马QY
2012-05-29
知道答主
回答量:20
采纳率:100%
帮助的人:19.1万
展开全部
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
最后擦痕。
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
风云格式助手
2021-01-25 · 百度认证:上海萌格电子商务官方账号
风云格式助手
一家专注软件研发的互联网科技公司,继承了研发与市场团队在海外共享软件 10 余年技术积累和市场经验,旗下有风云PDF转换器,风云CAD转换器,风云压缩等专业办公软件,也研发各类数字创意类软件
向TA提问
展开全部

在我们日常工作和日常学习中,有时候需要将一些Word 文件进行压缩,如何做到呢?我们可以使用[风云压缩]完成。一起来看下具体步骤吧!

已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式