vbscript 高亮首字母不大写的实词(表头,标题)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 高亮首字母不大写的实词(表头,标题)相关的知识,希望对你有一定的参考价值。

Sub tableHeaderNoUpperCase()
    Dim c As Cell
    For Each c In Selection.Tables(1).Range.Cells
        c.Select
        If c.Range.Font.Bold = True Then
            FunctionGroup.highlightNoUpperCase
        Else
        Exit Sub
        End If
    Next
End Sub
Sub sectionTitleNoUpperCase()
Dim i As Integer
For i = 1 To 3
Selection.HomeKey wdStory

    With Selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Text = ""
        .Wrap = wdFindStop
        .ParagraphFormat.OutlineLevel = i
        Do
        .Execute
            If .Found Then
                FunctionGroup.highlightNoUpperCase
            Else
                Exit Do
            End If
        Loop
    End With
Next
End Sub

Function highlightNoUpperCase()

coll = "at,could,due,on,down,right,left,up,till,until,opposite,by,within,throughout,inside,outside,without,but,beside,below,as,the,into,after,before,between,during,from,for,with,to,and,of,or,in"

wordC = Selection.Range.Words.count
Dim i As Integer
    i = 1
    Do While (i < wordC)
       
        aimT = Selection.Range.Words(i).Text
        
        If InStr(coll, Trim(aimT)) = 0 Then
        
            If 96 < Asc(Left(aimT, 1)) And Asc(Left(aimT, 1)) < 121 Then
                Selection.Range.Words(i).HighlightColorIndex = wdRed
            End If
        End If
        
        i = i + 1
    Loop
End Function


以上是关于vbscript 高亮首字母不大写的实词(表头,标题)的主要内容,如果未能解决你的问题,请参考以下文章

取消word 句首字母自动大写

word怎样取消句首字母大写

vbscript 加粗表头-18-7-26

有人能帮忙写个简单的按名字首字母排序python程序吗?

有人能帮忙写个简单的按名字首字母排序python程序吗?

使用poi导出的excel怎么设置表头不动