VBA增量字符间距

时间:2018-11-14 16:23:55

标签: vba fonts powerpoint

我有这段代码将文本压缩为0.2,但希望将其递增。因此,每次我运行代码时,文本都会压缩0.2。 有人知道我需要在代码中添加什么吗?

Sub CondenseText()

    On Error GoTo Catch

    Dim o As Shape, b As Boolean
    Set o = ActiveWindow.Selection.ShapeRange(1)
    If Not o Is Nothing Then
        With o
            .TextFrame2.TextRange.Font.Spacing = -0.2
        End With
    End If
    Exit Sub
Catch:
    If Err.Number = -2147188160 Then MsgBox CG_NOTHING_SELECTED
End Sub

0 个答案:

没有答案