Table of contents

Shape.Width 属性 (PowerPoint)Shape.Width Property (PowerPoint)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

返回或设置指定对象的宽度(以磅为单位)。可读/写。Returns or sets the width of the specified object, in points. Read/write.


表达式宽度expression. Width

表达式_一个表示一个Shape对象的变量。_expression A variable that represents a Shape object.

返回值Return Value



以下示例水平排列第一个和第二个窗口。即每个窗口占据应用程序窗口用户区域的一半垂直可用空间和所有水平可用空间。要使以下示例执行,只能有两个打开的文档窗口。This example arranges windows one and two horizontally; in other words, each window occupies half the available vertical space and all the available horizontal space in the application window's client area. For this example to work, there must be only two document windows open.

Windows.Arrange ppArrangeTiled

ah = Windows(1).Height                      ' available height

aw = Windows(1).Width + Windows(2).Width    ' available width

With Windows(1)

    .Width = aw

    .Height = ah / 2

    .Left = 0

End With

With Windows(2)

    .Width = aw

    .Height = ah / 2

    .Top = ah / 2

    .Left = 0

End With

以下示例将指定表中第一列的宽度设置为 80 磅(每英寸 72 磅)。This example sets the width for column one in the specified table to 80 points (72 points per inch).

ActivePresentation.Slides(2).Shapes(5).Table.Columns(1).Width = 80

另请参阅See also


Shape 对象Shape Object

© 2018 Microsoft