首页 > 解决方案 > VBA 增量字符间距

问题描述

我有这段代码可以将文本压缩为 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

标签: vbafontspowerpoint

解决方案


推荐阅读