在研究过程中,我发现了以下链接,
Extracting comments from a PowerPoint presentation using VBA
以下是针对此类问题提供的解决方案。
Sub ConvertComments()
''# Converts new-style comments to old
Dim oSl As Slide
Dim oSlides As Slides
Dim oCom As Comment
Dim oShape As Shape
Open "filename.txt" For Output As 1
Set oSlides = ActivePresentation.Slides
Dim myContext As String
For Each oSl In oSlides
For Each oCom In oSl.Comments
myContext = ""
For ShapeIndex = oCom.Parent.Shapes.Count To 1 Step -1
myContext = myContext & oCom.Parent.Shapes(ShapeIndex).AlternativeText & " "
Next
Write #1, oCom.Author & ";" & myContext & ";" & oCom.Text
Next oCom
Next oSl
Close 1
End Sub
我发现这个脚本没有在幻灯片中获取回复评论,它只从幻灯片中获取主要评论,我也尝试更新此解决方案以获取幻灯片中的所有评论,运气不好我找不到溶液,
有没有办法实现这种情况。 在此先感谢
答案 0 :(得分:2)
这是一个示例,它将显示幻灯片1及其下方的每条评论,评论的回复数量,每篇回复的作者和文字:
Sub Example()
Dim oCom As Comment
Dim x As Long
For Each oCom In ActivePresentation.Slides(1).Comments
With oCom
Debug.Print .Author & vbCrLf & vbTab & .Text
Debug.Print .Replies.Count
For x = 1 To .Replies.Count
With .Replies(x)
Debug.Print vbTab & .Author & vbTab & .Text
End With
Next
End With
Next
End Sub
这适用于2016年;我不确定2013年,我知道它在2010年(及更早版本)不会工作,因为它没有能力输入评论回复。 2016年输入的回复将转换为多条评论。