Code Snippet

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 

 

Sub 批量设置行距()

    Dim oSlides As Slides
    Dim oSlide As Slide
    Dim oPre As Presentation
    
    Dim oShape As Shape
    Dim oTextFrame As TextFrame
    Set oPre = ActivePresentation
    Set oSlides = oPre.Slides
    '每一张幻灯
    For i = 1 To oSlides.Count
        Set oSlide = oSlides.Item(i)
        '每一段文本
        For j = 1 To oSlide.Shapes.Count
            Set oShape = oSlide.Shapes(j)
            Set oTextFrame = oShape.TextFrame
            If oTextFrame.HasText Then
                '行高1.5倍
                oTextFrame.TextRange.ParagraphFormat.SpaceWithin = 1.5
            End If
        Next
    Next
End Sub

 

posted on 2012-05-10 14:52  kmlxk  阅读(866)  评论(0编辑  收藏  举报