Re: get ole objects from powerpoint

Tech-Archive recommends: Fix windows errors by optimizing your registry



This is what I have so far but it is not satisfactory.

Sub TellAll()

Dim arrShapes As Variant
Dim iCount As Integer
Dim objWord As Word.Application
Dim objDoc As Word.Document
ReDim arrShapes(0)

Dim oSh As Shape
For Each oSh In ActiveWindow.Selection.SlideRange(1).Shapes
If oSh.Type = 7 Then
arrShapes(iCount) = oSh.Name
iCount = iCount + 1
ReDim Preserve arrShapes(iCount)
End If
Next oSh

For i = 0 To UBound(arrShapes) - 1
ActiveWindow.Selection.SlideRange.Shapes(arrShapes(i)).Copy

Set objWord = CreateObject("Word.application")
objWord.Visible = True

objWord.Documents.Add
objWord.Selection.Paste
objWord.Dialogs(wdDialogFileSaveAs).Show

objWord.Visible = True


objWord.ActiveDocument.Close
objWord.Visible = False
objWord.Quit

Set objWord = Nothing
Next i

End Sub

because I use copy to get the content of the ole into word I miss
things like header and footer.


vonclausowitz@xxxxxxxxx schreef:

> Hi All,
>
> I have a powerpoint slide with embedded some ole-objects (ie. word
> files).
> I want a VB code to extract all these worddocs and save them under a
> certain name
> in a certain folder.
>
> Anyone knows how to attchieve this?
>
> Regards
>
> Marco
> The Netherlands

.



Relevant Pages