VBA中的Powerpoint更改表格形成

时间:2016-06-29 11:07:42

标签: vba powerpoint powerpoint-vba

我正在尝试编辑幻灯片中的表格,我正在使用此代码,但需要花费大量时间才能完成。

DELIMITER |
CREATE TRIGGER `add2` AFTER UPDATE ON `route`
FOR EACH ROW 
BEGIN

    UPDATE loc
    SET drivername = new.driver_d_name
    WHERE rt_nanme = old.rt_num;

    UPDATE loc
    SET rt_nanme = new.rt_num
    WHERE rt_nanme = old.rt_num;    

END

1 个答案:

答案 0 :(得分:0)

也许这段代码可以帮到你。它将更改每个活动演示表格式。您只需更新字体名称和字体大小。

子格式()

Dim s As Slide 昏暗的形状 Dim oTbl As Table Dim lRow As Long Dim lCol As Long

对于每个人在ActivePresentation.Slides

For Each oSh In s.Shapes
    If oSh.HasTable Then
        Set oTbl = oSh.Table
        For lRow = 1 To oTbl.Rows.Count
            For lCol = 1 To oTbl.Columns.Count
                With oTbl.Cell(lRow, lCol).Shape.TextFrame.TextRange
                    .Font.Name = "Batang"
                    .Font.Size = 16
                End With
            Next
        Next
    End If
Next

下一步

End Sub