提取PPT中的文字内容到WORD
1、打开PPT文件,按 Alt + F11
键打开[VBA编辑器
2、点击【工具】-【引用】,找到 Microsoft Word 16.0 Object Library
`勾选添加。
3、点击【插入】-【模块】,复制以下代码进编辑器。
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
4、最后点击【运行】代码,或者按【F5】键,PPT就成功转换成Word了。
按 Alt + F11
点击【工具】-【引用】
点击【插入】-【模块】
点击 运行图标
转换成功
转载请注明出处