将PPT中所有文本框里的文字提取出来
打开PPT,按ALT+F11打开VBA编辑器,在左面的工程视图里点击右键,选择插入->模块,添加一个模块,名字都不用改。
然后点击顶部的“工具”菜单,选择引用,找“Microsoft Word X.0 Object Library”(其中X与你的OFFICE版本有关),钩上,点确定
将下列代码贴到刚建立的模块里,按F5即可 Sub Main()
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
复制以上代码后,f5,就会打开一个word,另存为即可。