打开PPT,按ALT+F11打开VBA编辑器,(部分电脑FN+ALT+F11)在左面的工程视图里点击右键,选择插入->模块,添加一个模块,名字都不用改。
然后点击顶部的“工具”菜单,选择引用,找“Microsoft Word X.0 Object Library”(其中X与你的OFFICE版本有关),钩上,点确定
将下列代码贴到刚建立的模块里,按F5(部分电脑FN+F5)即可
Sub Main()
On Error Resume Next
Dim temp As New Word.Document, tmpShape As Shape, tmpSlide As Slide
For Each tmpSlide In ActivePresentation.Slides
For Each tmpShape In tmpSlide.Shapes
temp.Range().Text = temp.Range() + tmpShape.TextFrame.TextRange.Text
Next tmpShape
Next tmpSlide
temp.Application.Visible = True
End Sub