修改注释页面(PowerPoint)中所有文本框的位置

时间:2019-01-31 08:56:35

标签: vba powerpoint

我正在学习为PowerPoint创建小型宏。

我想更改幻灯片在注释页面中的位置。 我创建了这个小宏:

DataTable customersTable = ...
DataTable billingsTable = ...
IEnumerable<Customer> customers = customersTable.ToCustomers();
IEnumerable<Billing> billings = billingsTable.ToBillings();
IEnumerable<CustomerBilling> customerBillings = customers.ToCustomerBillings(billing);
DataTable customerBillingTable = result.ToDataTable();

我想将其应用于所有幻灯片,怎么办?

1 个答案:

答案 0 :(得分:0)

我建议您不要使用Select.功能。您最好Dim使用范围(所有幻灯片)并引用该范围。

Sub macro_resize()
Dim sld As Object
Dim shp As Object

For Each sld In ActivePresentation.Slides
    For Each shp In sld.Shapes
        With shp.Range
            .Height = 450
            .Width = 510
            .Left = 30
            .Top = 290
        End With
    Next
Next
End Sub