`
wazhyu
  • 浏览: 19168 次
  • 性别: Icon_minigender_1
  • 来自: 哈尔滨
社区版块
存档分类
最新评论

大写字母变小写的Word宏

阅读更多
Sub Aa()
'
' Aa Macro
' 宏在 2008-3-27 由 ccc 录制
'
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "A"
        .Replacement.Text = "a"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
        With Selection.Find
        .Text = "B"
        .Replacement.Text = "b"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "C"
        .Replacement.Text = "c"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "D"
        .Replacement.Text = "d"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "E"
        .Replacement.Text = "e"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "F"
        .Replacement.Text = "f"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "G"
        .Replacement.Text = "g"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "H"
        .Replacement.Text = "h"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "I"
        .Replacement.Text = "i"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "J"
        .Replacement.Text = "j"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "K"
        .Replacement.Text = "k"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "L"
        .Replacement.Text = "l"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "M"
        .Replacement.Text = "m"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "N"
        .Replacement.Text = "n"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "O"
        .Replacement.Text = "o"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "P"
        .Replacement.Text = "p"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "Q"
        .Replacement.Text = "q"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "R"
        .Replacement.Text = "r"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "S"
        .Replacement.Text = "s"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "T"
        .Replacement.Text = "t"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "U"
        .Replacement.Text = "u"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "V"
        .Replacement.Text = "v"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "W"
        .Replacement.Text = "w"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "X"
        .Replacement.Text = "x"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "Y"
        .Replacement.Text = "y"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "Z"
        .Replacement.Text = "z"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = "("
        .Replacement.Text = "("
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    With Selection.Find
        .Text = ")"
        .Replacement.Text = ")"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchByte = True
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With

    Selection.Find.Execute Replace:=wdReplaceAll
End Sub

分享到:
评论

相关推荐

    excel小写变大写

    第三次则会将大小写混合的文本变为首字母大写,其余小写。在Word中完成转换后,再将内容复制回Excel即可。 对于数字的小写变大写转换,Excel提供了一种内置的格式设置方式。在包含数字的单元格上点击右键,选择...

    超简单python实现大小写转换

    在Python编程语言中,大小写转换是常见的字符串操作。这篇教程将向你介绍如何使用Python简单地实现字符串的大写和小写转换。Python内置了一些方便的字符串方法,使得这一过程变得非常直观和高效。 首先,我们来看`...

    word85例文档

    再次按下,全部字母变大写;再按一次,恢复为小写。 4. **调整Word表格行序** 在Word表格中,使用“Shift+Alt+方向键”可以快速调整行的顺序。将光标放在要调整的行内,按住“Shift+Alt”键,然后按上或下方向键,...

    39码下载,可再word中使用

    Code 39条形码可以编码数字、大写字母和一些特殊字符,因此在工业、库存管理、物流等领域有广泛应用。它支持的字符集包括数字0-9、字母A-Z(不区分大小写)以及一些特殊符号如星号(*)、加号(+)、减号(-)、句号(.)、...

    uls,文本文件中的ASCII字符的大小写转换工具源码

    大小写互换(大写变小写,小写变大写) What is uls =========== uls is a text utility to translate between the uppercase and the lowercase of ASCII text file. How to make =========== untar the source...

    wordexcel快捷键大全.pdf

    - Ctrl+Shift+K: 小型大写字母 - Ctrl+=: 下标 - Ctrl+Shift++: 上标 - Ctrl+Shift+Z: 取消字符格式 - Ctrl+Shift+Q: 设置为Symbol字体 - Ctrl+Shift+*: 显示非打印字符 - Shift+F1: 查看格式 - Ctrl+Shift+C: 复制...

    uls,文本文件中的ASCII字符的大小写转换程序源码

    大小写互换(大写变小写,小写变大写).如下为程序包内的README说明文件: -------------------- What is uls =========== uls is a text utility to translate between the uppercase and the lowercase of ASCII ...

    Word 2021快速输入的技巧.docx

    7. **快速转换英文字母大小写**:在Word 2021中,选中英文单词或句子,按下`Shift+F3`快捷键,可以快速在全大写、首字母大写和全小写之间切换,无需手动修改。 8. **隐藏文字功能**:如果你希望在文档中隐藏某些...

    Word 快捷键 大全

    - `Ctrl+Shift+K`:将字母变为小型大写字母。 - `Ctrl+=`:应用下标格式。 - `Ctrl+Shift++`:应用上标格式。 - `Ctrl+Shift+Z`:取消人工设置的字符格式。 2. **设置段落格式的快捷键:** - `Ctrl+Q`:删除...

    全国计算机等级考试二级MSOffice高级应用.pdf

    8. 文本编码:在ASCII编码表中,大写字母和小写字母的顺序是固定的,可以通过比较它们的十六进制码值来确定字母的位置,例如,大写字母H的二进制码值是1001000,字母K的十六进制码值是4B,它们之间相差3。...

    PPT制作文字排版有什么秘籍.pdf

    小型大写字母,类似于所有的大写字母,当文本中有一大段大写字母,可读性很难。然而,小型字母应该被用在缩写中,以便于不投放更多的注意在小型字母上,当然,使用小型字母在 AM 和 PM 中。你也可以在文章章节的第一...

    Word快捷键

    - `Ctrl+Shift+K`:将字母转换为小型大写字母,常用于首字母缩写。 - `Ctrl+=`:应用下标格式。 - `Ctrl+Shift++`:应用上标格式。 - `Ctrl+Shift+Z`:取消人工设置的字符格式。 - `Ctrl+Shift+Q`:将选中部分...

    word快捷键大全提高效率.pdf

    Shift+F3切换字母大小写,Ctrl+Shift+A全选字母并转为大写。 2. 格式控制: Ctrl+B、Ctrl+U和Ctrl+Shift+W分别用于加粗、下划线和仅对字词下划线,不包括空格。 3. 编辑与移动: 快捷键如Ctrl+左/右箭头可逐词...

    Word快捷键.pdf

    8. **Shift+F3键**:改变选中文字的大小写,循环转换大写、小写和首字母大写。 9. **Shift+F4键**:重复上一次的查找或定位操作。 10. **Shift+F12键**:执行“文件”菜单中的“保存”命令。 11. **Shift+F5键**:...

    Word常用快捷键(大全).doc

    - `Shift+F3`:切换字母大小写。 - `Ctrl+Shift+A`:将所选字母设为大写。 2. **段落格式快捷键**: - `Ctrl+Q`:删除段落格式。 - `Ctrl+Spacebar`:删除字符格式。 - `Ctrl+1`:单倍行距。 - `Ctrl+2`:...

    Capitalize-Toy-Problem:Java问题大写文本

    然而,这些方法并不适合此问题,因为它们会改变整个单词的大小写,而我们只需要改变首字母。 要实现目标功能,可以使用`substring()`方法结合字符串连接操作。对于每个单词,提取首字母并将其转换为大写,然后获取...

    电脑知识操作技巧大全——Word快捷键大全.pdf

    - `Shift+F3`:切换字母大小写。 - `Ctrl+Shift+A`:将所选字母转换为大写。 2. **段落格式快捷键**: - `Ctrl+Q`:删除段落格式。 - `Ctrl+Spacebar`:删除字符格式。 - `Ctrl+1`:设置单倍行距。 - `Ctrl+2...

    Office快捷键大全.doc

    Ctrl+Shift+K则用于将字母变为小型大写字母。 下标和上标的设置也十分便捷,Ctrl+=(等号)创建下标,Ctrl+Shift++(加号)创建上标。若要取消字符格式,可以使用Ctrl+Shift+Z。Ctrl+Shift+Q可将选区设置为Symbol...

    2021-2022计算机二级等级考试试题及答案No.16336.docx

    - 用【格式】/【更改大小写】命令,选择“词首字母大写”,可以实现指定格式的大小写转换。 20. Visual FoxPro字符串查找: - `ATC()` 函数用于查找子串在字符串中的位置。 这些知识点涵盖了数据库操作、计算机...

    最快最实用汉字转拼音软件

    把界面变小一点点,让800*600下也能显示完整 5).修改选首字母功能后,退出后再进入程序时就无法使用的bug 实用汉字转拼音 绿色版4.6版新增功能: 1).加入支持分词(在"支持繁体字"选项旁边) 2).不限制转换的字数,加入...

Global site tag (gtag.js) - Google Analytics