⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainactions.vb

📁 讲解visual studio的应用
💻 VB
字号:
Public Class MainActions

    Public HeadingAreaRef As Microsoft.Office.Tools.Word.Bookmark

    Private Sub FormatDocument_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles FormatDocument.Click

        If InStr(HeadingAreaRef.Range.Text, "Wrox") > 0 Then
            HeadingAreaRef.Style = "Heading 1"
        Else
            HeadingAreaRef.Style = "Heading 2"
        End If

        With Globals.ThisDocument.Tables(1).Rows(1)
            If (HeadingAreaRef.End - HeadingAreaRef.Start) > 10 Then
                .Range.Font.Bold = True
                .Range.Font.Color = Word.WdColor.wdColorBlue
                .Range.Font.Size = 16
            Else
                .Range.Font.Bold = False
                .Range.Font.Color = Word.WdColor.wdColorDarkGreen
                .Range.Font.Size = 24
            End If
        End With

    End Sub

    Private Sub SaveProperties_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles SaveProperties.Click

        Globals.ThisDocument.BuiltInDocumentProperties("Author").Value = _
            PaneAuthorName.Text
        MessageBox.Show("The Author Name property has been set to " & _
            PaneAuthorName.Text & ". You can check by looking at File->Properties.")
    End Sub

End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -