vbscript 检测摘要里是否出现网址,文献引用,公式,图,表等的提及

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 检测摘要里是否出现网址,文献引用,公式,图,表等的提及相关的知识,希望对你有一定的参考价值。

Sub citationInAbstract()
Dim j, k As Integer
       k = 0
    arr = "Table,Figure,Equation,www.,\[[0-9-\\–]+?\] "
    findT = Split(arr, ",")
    Selection.HomeKey wdStory
    With Selection.Find
        .ClearFormatting
        .Replacement.ClearFormatting
        .Wrap = wdFindStop
        .MatchWildcards = False
        .Forward = True
        .Text = "Abstract"
        .Font.Bold = True
        .Replacement.Text = ""
        .Execute
        If .Found Then
            Selection.Paragraphs(1).Range.Select
            For i = 0 To UBound(findT)
             j = 0
     
                Dim reg As New RegExp
                With reg
                    .Global = True
                    .Pattern = findT(i)
                    Set matches = .Execute(Selection.Text)
                   If .test(Selection.Text) = True Then
                        For Each m In matches
                            
                            myL = m.firstindex
                            Dim myrange As Range
                            Set myrange = ActiveDocument.Range(Selection.Start + myL + k, Selection.Start + myL + Len(m) + k)
                            myrange.HighlightColorIndex = wdYellow
                            If j = 0 Then
                                myrange.comments.Add myrange, "Citation is't allowed"
                                k = k + 1
                            End If
                             j = j + 1
                        Next
                       
                   End If
                End With
            Next
        Else
            ActiveDocument.Paragraphs(1).Range.comments.Add ActiveDocument.Paragraphs(1).Range, "can't find abstract"
        End If
    End With
End Sub

以上是关于vbscript 检测摘要里是否出现网址,文献引用,公式,图,表等的提及的主要内容,如果未能解决你的问题,请参考以下文章

vbscript 11.检测补充材料引用或者增刊。 Sec是否遗漏(缺少补充材料的引用/补充材料部分缺失

vbscript 文献引用公式框改文本

vbscript 13.检测文献部分首页页码相同的情况15-15,从大到小

文献导入endnote的方法有

vbscript 检测文件名的期刊是否和文件里页眉页脚的期刊一致,提示询问期刊标识是否正确

vbscript 10.检测网址www.mdpi.com/link