博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Modules for SWL
阅读量:4120 次
发布时间:2019-05-25

本文共 6272 字,大约阅读时间需要 20 分钟。

Sub aeiou2x()'' aeiou2x Macro' Macro recorded 7/7/2008 by Ye.Tian'    Selection.Find.ClearFormatting    Selection.Find.Replacement.ClearFormatting        With Selection.Find        .Text = "a"        .Replacement.Text = "x"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "e"        .Replacement.Text = "x"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "i"        .Replacement.Text = "x"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "o"        .Replacement.Text = "x"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "u"        .Replacement.Text = "x"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "A"        .Replacement.Text = "X"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "E"        .Replacement.Text = "X"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "I"        .Replacement.Text = "X"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "O"        .Replacement.Text = "X"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAll        With Selection.Find        .Text = "U"        .Replacement.Text = "X"        .Forward = True        .Wrap = wdFindContinue        .Format = False        .MatchCase = True        .MatchWholeWord = False        .MatchByte = False        .MatchWildcards = False        .MatchSoundsLike = False        .MatchAllWordForms = False    End With    Selection.Find.Execute Replace:=wdReplaceAllEnd SubSub markSymbolsForRC()'' markSymbolsForRC Macro' Macro recorded 7/7/2008 by Ye.Tian'    Dim sstr1, sstr2        ' add symbol which should check twice; e,g; & and &&    sstr1 = "%,&,"""    sstr1 = Split(sstr1, ",")        ' add symbol which should check only once;    sstr2 = "/n,/f,/0,%s,%S,%a,%A,%d,%D,%f,%F,%e,%E"    sstr2 = Split(sstr2, ",")        Dim counter ' dont mind its name    For Each counter In sstr1        Selection.Find.Replacement.ClearFormatting        Selection.Find.Replacement.Style = ActiveDocument.Styles("tw4winInternal")        With Selection.Find            .Text = counter            .Replacement.Text = counter            .Forward = True            .Wrap = wdFindContinue            .Format = True            .MatchCase = True            .MatchWholeWord = False            .MatchByte = False            .MatchWildcards = False            .MatchSoundsLike = False            .MatchAllWordForms = False        End With        Selection.Find.Execute Replace:=wdReplaceAll                Selection.WholeStory        With Selection.Find            .Text = counter & counter            .Replacement.Text = ""            .Forward = True            .Wrap = wdFindContinue            .Format = False            .MatchCase = False            .MatchWholeWord = True            .MatchByte = False            .MatchWildcards = False            .MatchSoundsLike = False            .MatchAllWordForms = False            If .Execute = True Then                Selection.ClearFormatting            End If        End With    Next counter        For Each counter In sstr2        Selection.Find.Replacement.ClearFormatting        Selection.Find.Replacement.Style = ActiveDocument.Styles("tw4winInternal")        With Selection.Find            .Text = counter            .Replacement.Text = counter            .Forward = True            .Wrap = wdFindContinue            .Format = True            .MatchCase = False            .MatchWholeWord = False            .MatchByte = False            .MatchWildcards = False            .MatchSoundsLike = False            .MatchAllWordForms = False        End With        Selection.Find.Execute Replace:=wdReplaceAll            Next counter    End Sub

转载地址:http://arnpi.baihongyu.com/

你可能感兴趣的文章
C语言-预处理指令3-文件包含
查看>>
C语言-变量类型
查看>>
C语言-static和extern关键字1-对函数的作用
查看>>
C 语言-static和extern关键字2-对变量的作用
查看>>
【JavaScript 教程】浏览器—History 对象
查看>>
还不会正则表达式?看这篇!
查看>>
100道+ JavaScript 面试题,助你查漏补缺
查看>>
JavaScript深入理解之闭包
查看>>
这才是学习Vite2的正确姿势!
查看>>
7 个适用于所有前端开发人员的很棒API,你需要了解一下
查看>>
25个构建Web项目的HTML建议,你需要了解一下!
查看>>
【web素材】02-10款大气的购物商城网站模板
查看>>
6种方式实现JavaScript数组扁平化(flat)方法的总结
查看>>
如何实现a===1 && a===2 && a===3返回true?
查看>>
49个在工作中常用且容易遗忘的CSS样式清单整理
查看>>
20种在学习编程的同时也可以在线赚钱的方法
查看>>
隐藏搜索框:CSS 动画正反向序列
查看>>
12 个JavaScript 特性技巧你可能从未使用过
查看>>
127个超级实用的JavaScript 代码片段,你千万要收藏好(上)
查看>>
【视频教程】Javascript ES6 教程27—ES6 构建一个Promise
查看>>