香港新浪網 MySinaBlog
« 上一篇 | 下一篇 »
Emily | 4th Apr 2006, 10:55 AM | Office Application | (1015 Reads)

轉換 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


[2] Re: squall
squall : 怎麼引用Microsoft Powerpoint 11.0 Object Library要在哪裡加進去呢??

MS Word VBA

VBE - Tools - References -


[引用] | 作者 Emily | 5th Nov 2009 07:16 AM | [舉報垃圾留言]

[1] 請問怎麼引用Microsoft Powerpoint 11.0 Object Library

怎麼引用Microsoft Powerpoint 11.0 Object Library

要在哪裡加進去呢??


[引用] | 作者 squall | 2nd Nov 2009 14:57 PM | [舉報垃圾留言]