• WORD自定义宏


    自定义快捷键

    折叠所有标题

    Word选项—自定义功能区—自定义键盘—不在功能区内的命令—ColllapseAllHeadings

    展开所有标题

    Word选项—自定义功能区—自定义键盘—不在功能区内的命令—ExpandAllHeadings

    全屏快捷键 Alt+V+U, esc退出 可通过录制宏设定F11全屏

    Word自定义宏

    Sub 标题1()
        Selection.Style = ActiveDocument.Styles("标题 1")
    End Sub
    
    Sub 标题2()
        Selection.Style = ActiveDocument.Styles("标题 2")
    End Sub
    
    Sub 蓝色文字()
        Selection.Font.Color = wdColorBlue
    End Sub
    
    Sub 删除整段()
        Selection.MoveDown Unit:=wdParagraph, Count:=1
        Selection.MoveUp Unit:=wdParagraph, Count:=1, Extend:=wdExtend
        Selection.TypeBackspace
    End Sub
    
    Sub 显示导航目录()
        If ActiveWindow.DocumentMap = True Then
            ActiveWindow.DocumentMap = False
        Else
            ActiveWindow.DocumentMap = True
        End If
    End Sub
    
    Sub 红色文字()
        Selection.Font.Color = wdColorRed
    End Sub
    
    Sub 换行()
        Selection.EndKey Unit:=wdLine
        Selection.TypeParagraph
    End Sub
    
    Sub 全屏显示()
        ActiveWindow.View.FullScreen = Not ActiveWindow.View.FullScreen
    End Sub
    
    Sub 标题3()
        Selection.Style = ActiveDocument.Styles("标题 3")
    End Sub
    
    Sub 浅色文字()
        Selection.Font.Color = wdColorGray25
    End Sub
    
    Sub 黑色文字()
        Selection.Font.Color = wdColorBlack
    End Sub
    
    Sub 行前插入空行()
        Selection.HomeKey Unit:=wdLine
        Selection.TypeParagraph
        Selection.MoveUp Unit:=wdLine, Count:=1
    End Sub
    
    Sub 回到前一位置()
        Application.GoBack
    End Sub
    
    Sub 复制当前行()
        Selection.HomeKey Unit:=wdLine
        Selection.EndKey Unit:=wdLine, Extend:=wdExtend
        Selection.Copy
        Selection.PasteAndFormat (wdFormatOriginalFormatting)
        Selection.PasteAndFormat (wdFormatOriginalFormatting)
        Selection.MoveLeft Unit:=wdCharacter, Count:=1
    End Sub
    
    Sub 增强复制()
        If Selection.Type = wdSelectionIP Or Selection.Type = wdNoSelection Then  '若选择为空
            Selection.HomeKey Unit:=wdLine
            Selection.EndKey Unit:=wdLine, Extend:=wdExtend
            Selection.Copy
            '复制整行  'MsgBox "没有选择"
        Else  '若选择不为为空
            '正常操作
            Selection.Copy
        End If
    End Sub
    
    Sub 增强剪切()
        If Selection.Type = wdSelectionIP Or Selection.Type = wdNoSelection Then  '若选择为空
            Selection.HomeKey Unit:=wdLine
            Selection.EndKey Unit:=wdLine, Extend:=wdExtend
            Selection.Cut
            '剪切整行  'MsgBox "没有选择"
        Else  '若选择不为为空
            '正常操作
            Selection.Cut
        End If
    End Sub
    Sub 单页170()
        With ActiveWindow.ActivePane.View.Zoom
            .PageColumns = 1
            .PageRows = 1
        End With
        ActiveWindow.ActivePane.View.Zoom.Percentage = 170
    End Sub
    Sub 双页92()
    
        With ActiveWindow.ActivePane.View.Zoom
            .PageColumns = 2
            .PageRows = 1
        End With
        ActiveWindow.ActivePane.View.Zoom.Percentage = 92
        With ActiveWindow.View.RevisionsFilter
            .Markup = wdRevisionsMarkupNone
            .View = wdRevisionsViewFinal
        End With
    End Sub

    杨韬的学习备忘录  YTYT2002YTYT

    http://www.cnblogs.com/ytyt2002ytyt/p/4008371.html

  • 相关阅读:
    搭建自己的博客(九):使用shell模式批量添加博客文章并增加分页功能
    搭建自己的博客(八):使用fontawesome框架来添加图标以及美化详情页
    linux系列(十):cat命令
    linux系列(九):touch命令
    搭建自己的博客(七):使用bootstrap框架美化导航栏
    linux系列(八):cp命令
    搭建自己的博客(六):添加首页,使用css对界面做美化
    linux系列(七):mv命令
    Re-enable extensions not coming from Chrome Web Store on Chrome v35+ (with enhanced security)
    liblensfun 在 mingw 上编译时遇到的奇怪问题
  • 原文地址:https://www.cnblogs.com/ytyt2002ytyt/p/4008371.html
Copyright © 2020-2023  润新知