首页>文档>PPT文档>PPT宏代码>改变表格边框颜色及线条粗细之宏代码

改变表格边框颜色及线条粗细之宏代码

Option Explicit
Sub HowToUseIt()
Call SetTableBorder(ActivePresentation.Slides(1).Shapes(1).Table)
End Sub
Sub SetTableBorder(oTable As Table)
Dim I As Integer
With oTable
    For I = 1 To .Rows.Count
        With .Rows(I).Cells(1).Borders(ppBorderLeft)
            .ForeColor.RGB = RGB(255, 153, 51)
            .Weight = 10
        End With
        With .Rows(I).Cells(.Rows(I).Cells.Count).Borders(ppBorderRight)
            .ForeColor.RGB = RGB(255, 153, 51)
            .Weight = 10
        End With
    Next I
    For I = 1 To .Columns.Count
        With .Columns(I).Cells(1).Borders(ppBorderTop)
            .ForeColor.RGB = RGB(255, 153, 51)
            .Weight = 10
        End With
        With .Columns(I).Cells(.Columns(I).Cells.Count).Borders(ppBorderBottom)
            .ForeColor.RGB = RGB(255, 153, 51)
            .Weight = 10
        End With
    Next I
End With
End Sub

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索