如何更改所有文本的字体大小?

时间:2018-11-09 16:28:55

标签: vba ms-word

我正在尝试更改使用Excel VBA打开的MS Word文档中文本的字体大小。

Sub Validator()
    Dim doc As Word.document
    lngAccountCounter = 3
    Dim wordapp As Word.Application

    Set wordapp = New Word.Application
    wordapp.documents.Open ThisWorkbook.Path & "\Account.doc"
    wordapp.Visible = True
    wordapp.Activate

    With wordapp.Selection
        .Font.Size = 7
    End With
End Sub

1 个答案:

答案 0 :(得分:0)

您可以更改

With wordapp.Selection
    .Font.Size = 7
End With

收件人

ActiveDocument.Select
Selection.WholeStory
Selection.Font.Size = 7