AddComment 方法

       

添加一个批注。返回一个代表新批注的 Shape 对象。

expression.AddComment(Left, Top, Width, Height)

expression  必选。该表达式返回一个 Shapes 对象。

LeftTop  可选。Single 类型。批注边界框左上角相对于文档左上角的位置(以磅为单位)。默认情况下,批注位于文档的左上角。

WidthHeight  可选。Single 类型。批注的高度和宽度,以磅为单位。默认情况下,批注的高和宽均为 100 磅。

示例

本示例向 myDocument 中添加包含文本“Test Comment”的批注。

Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddComment(100, 100, 150, 150)
    .TextFrame.TextRange.Text = .TextFrame _
        .TextRange.Text + "Test Comment"
End With