vbscript 单词get_title11

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vbscript 单词get_title11相关的知识,希望对你有一定的参考价值。

Sub get_title11()
    i1 = Selection.Range.Cells(1).RowIndex
    j1 = Selection.Range.Cells(1).ColumnIndex
    n1 = get_form_number
    col_j = 3
    Dim mTab As Word.Table
    Set mTab = ActiveDocument.Tables(n1)
    bk1 = Replace(mTab.Cell(i1, col_j).Range.Text, Chr$(13) & Chr$(7), "")
    bk1 = Replace(bk1, "$", "")
    Selection.GoTo What:=wdGoToBookmark, Name:=bk1
    For i = 1 To 10000
        Selection.MoveUp unit:=wdParagraph
        If judge_pa Then
            If Left(Selection.Paragraphs(1).Range.Text, 5) = "-----" Then
                Selection.MoveDown unit:=wdParagraph
                mTab.Cell(i1, col_j + 1).Range.Text = Split(Selection.Paragraphs(1).Range.Text, Chr(13))(0)
                Exit For
            End If
        End If
    Next
    mTab.Cell(i1 + 1, col_j + 1).Select
    Selection.MoveLeft unit:=wdCharacter
End Sub
Function get_form_number()
    a = Selection.Tables(1).Range.Start
    For i = 1 To ActiveDocument.Tables.Count
        If a = ActiveDocument.Tables(i).Range.Start Then
            get_form_number = i
            Exit For
        End If
    Next
End Function

以上是关于vbscript 单词get_title11的主要内容,如果未能解决你的问题,请参考以下文章

vbscript 单个单词查缩写

vbscript 单词提取

vbscript 单词add_link

vbscript excel从单词中获取形式

vbscript 单词select_and_cp

“vbscript”查找行有相似的单词用冒号分隔“:”[关闭]