ppt复制文本框文字到word的方法

时间:2022-11-03 00:08:05

打开ppt按Alt+F11,插入--模块,  选中“工具”--“引用”--MicroSoft Word 。。

复制代码:

Sub Main()
On Error Resume Next
Dim temp As New Word.Document, tmpShap 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。