为什么 PowerPoint 笔记页面中的形状计数会有所不同,即使它们看起来都是空的?

Why does the shape count in PowerPoint Notes page vary even when they all look empty?

在较长的演示文稿中,大多数注释只是说“单击以添加注释”。但是,有些 NotesPage 有 0、1、2 或 3 个形状。根据下面的代码和 MsoShapeType 枚举,这些形状是 Placeholders。为什么占位符的个数不一致?

Sub shapes_in_notes()
    counter = 0
    s = ""
    For Each sli In ActivePresentation.Slides
        counter = counter + 1
        s = counter & ": " & sli.NotesPage.Shapes.Count & " shapes: "
        For Each shi In sli.NotesPage.Shapes
            s = s & shi.Type & ", "
        Next
        Debug.Print s
    Next
End Sub

典型输出:

1: 2 shapes: 14, 14, 
2: 3 shapes: 14, 14, 14, 
3: 3 shapes: 14, 14, 14, 
4: 3 shapes: 14, 14, 14, 
5: 3 shapes: 14, 14, 14, 
6: 3 shapes: 14, 14, 14, 
7: 3 shapes: 14, 14, 14, 
8: 3 shapes: 14, 14, 14, 
9: 2 shapes: 14, 14, 
10: 3 shapes: 14, 14, 14, 
11: 3 shapes: 14, 14, 14, 
12: 2 shapes: 14, 14, 
13: 3 shapes: 14, 14, 14, 
14: 1 shapes: 14, 
15: 3 shapes: 14, 14, 14, 
16: 2 shapes: 14, 14, 
17: 3 shapes: 14, 14, 14, 
18: 2 shapes: 14, 14, 
19: 0 shapes: 
20: 3 shapes: 14, 14, 14, 
21: 2 shapes: 14, 14, 
...

答案就在程序界面中。打开备注页,然后选择 插入>页眉和页脚。预览显示可用的占位符。除了默认的幻灯片和文本占位符外,日期和时间页码页眉[=20= 等可选占位符] 和 页脚 。所以你最多可以有6个。在没有占位符的一页上,幻灯片和文本占位符可能已被用户删除。

为了区分它们,使用shi.PlaceholderFormat.Type