轉換 Words 文檔中嵌入式 PPT 至 PPT
'---------------------------------------------------------------------------------------' Module : Module1
' DateTime : 4/4/2006 10:46
' Author :
' Purpose : 轉換文檔中嵌入式 PPT
' 需要引用 Microsoft Powerpoint 11.0 Object Library
'---------------------------------------------------------------------------------------
Option Explicit
Sub ExportEmbeddedSlidesFromWords()
Dim iCtr As Integer
Dim oPPT As Object
Dim oDoc As Document
Set oDoc = ActiveDocument
For iCtr = 1 To oDoc.InlineShapes.Count
If oDoc.InlineShapes(iCtr).Type = wdInlineShapeEmbeddedOLEObject Then
If oDoc.InlineShapes(iCtr).OLEFormat.progID = "PowerPoint.Slide.8" Then
oDoc.InlineShapes(iCtr).OLEFormat.DoVerb 2
Set oPPT = CreateObject("PowerPoint.Application")
Call oPPT.presentations(oPPT.presentations.Count) _
.SaveCopyAs("YourPath" & iCtr & ".ppt")
oPPT.presentations(oPPT.presentations.Count).Close
End If
End If
Next iCtr
oPPT.Quit
Set oPPT = Nothing
End Sub




