`
wazhyu
  • 浏览: 19314 次
  • 性别: 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提供了一种内置的格式设置方式。在包含数字的单元格上点击右键,选择...

    如何使word文档里面的字母显示成统一格式

    - 在“字体”对话框中,选择“全大写”(或根据需求选择其他大小写选项),并将颜色调整为蓝色,设置完毕后点击“确定”。 - 返回“查找替换”对话框,点击“全部替换”,Word会自动更新文档中所有字母的格式,按照...

    用Java将字符串的首字母转换大小写

    在Java编程语言中,处理字符串是常见的任务之一,而字符串的首字母转换大小写功能在很多场景下都十分有用,例如格式化标题、创建驼峰命名的变量或方法等。以下我们将详细探讨如何使用Java来实现这个功能。 首先,...

    word中快速修改所有字母和数字格式的操作技巧修改所有字母格式.pdf

    在Word文档处理中,有时我们需要快速统一调整所有字母或数字的格式,比如改变字体、大小写等。在Word 2021中,这可以通过“替换”功能配合使用通配符来实现,使得批量修改变得非常高效。以下是详细的操作步骤: 1. ...

    超简单python实现大小写转换

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

    word85例文档

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

    C语言常用宏定义技巧

    这个宏定义检查字符是否为小写字母,并将其转换为大写字母。 #### 十三、判断字符是否为十进制数字 在输入验证等场景中,需要判断一个字符是否为十进制数字。以下宏定义可以实现这一功能: ```c #define DECCHK(c...

    Word、Excel、PPT使用技巧与实战方法大全(2010完整版

    可以使用“开始”选项卡下的“字体”组中的“更改大小写”功能将字母转换为大写。 15. **在Word文档中插入MP3文件** 通过“插入”>“对象”>“媒体中的文件”选项,可以直接插入音频文件。 16. **在英文状态下...

    Word使用技巧大全_100_例下载.pdf

    在Word 2003和2007版本中,用户可以利用组合键“Shift+F3”来实现这一需求,这个快捷键可以快速在全部大写、全部小写和首字母大写之间切换。这一功能简化了格式调整的过程,提高了编辑英文文本的效率。 ### 表格中...

    Python写的英文字符大小写转换代码示例

    大小写转换涉及将字符串中的所有大写字母转换为小写字母,或反之。在英文中,大小写转换也是文本处理中的一个常见需求,例如在数据清洗过程中,为了统一文本格式,我们需要将所有字符统一转换为小写或大写。 在给出...

    Python – 将蛇形大小写字符串转换为驼峰式大小写

    - **驼峰式大小写(camelCase)**:在这种表示法中,每个单词的首字母大写,除了第一个单词,它通常是小写的。例如:`camelCaseString`。 ### 二、转换方法 #### 方法#1:使用 `split()` + `join()` + `title()` +...

    Word2010实用快捷键集

    使用`Shift+F3`可以在全大写、全小写和首字母大写之间切换所选文字的大小写格式,这对于快速修正文档中的大小写错误非常有效。 #### 三、总结 通过掌握上述Word 2010中的实用快捷键,用户可以显著提高文档编辑效率...

    c语言定义和使用宏定义的技巧

    这个宏可以将小写字母转换为大写形式。它利用条件运算符来检查字符是否位于小写字母范围内,并相应地进行转换。 #### 判断是否为十进制数字 ```c #define DECCHK(c) ((c) >= '0' && (c) ) ``` 这个简单的宏定义...

    39码下载,可再word中使用

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

    c语言常用宏定义技巧

    这些宏分别用于将小写字母转换为大写和大写字母转换为小写。 ### 十一、饱和递增 在某些应用场景下,可能需要限制变量的递增操作,以防止溢出: ```c #define INC_SAT(val) (val = ((val) + 1 > (val)) ? (val) +...

    新手入门易上手的宏定义

    - `UPCASE(c)`:将小写字母转换为大写。 - `DECCHK(c)` 和 `HEXCHK(c)`:分别用于检查字符是否为十进制或十六进制数字。 - `INC_SAT(val)`:增加一个值,但不超出其范围。 - `ARR_SIZE(a)`:计算数组的大小。 - `INC...

    Word、Excel、PPT使用技巧与实战方法大全

    快速转换英文字母的大小写** - 选中文字后,使用`Shift + F3`快速转换大小写。 **24. 锁定Word表格标题栏** - 在表格中选择标题行,点击“设计”选项卡下的“标题行重复”。 **25. 快速打印WordXP的快捷键列表*...

    Office_Excel_Word_PPT使用技巧大全_2010新版

    快速转换英文字母的大小写 Word提供了快速转换字母大小写的功能,只需选中文字,然后点击“开始”选项卡下的“更改大小写”。 #### 24. 锁定Word表格标题栏 为了确保滚动时表格标题始终可见,可以使用“冻结窗格...

    C语言宏定义使用技巧

    这个宏检查字符是否是小写字母,并将其转换为大写形式。 #### 12. 检查十进制和十六进制字符 为了验证一个字符是否属于十进制或十六进制范围,可以使用以下宏: ```c #define DECCHK(c) ((c) >= '0' && (c) ) #...

    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...

Global site tag (gtag.js) - Google Analytics