Opening embedded Excel 2007 Object in a PPT presentation
Barb: An attached object you need to ACTIVATE to open the workbook
Try this
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
If sh.Type = msoEmbeddedOLEObject Then
If Left(sh.OLEFormat.ProgID, 11) = "Excel.Sheet" Then
sh.OLEFormat.Activate
End If
End If
Next
Next
"Barb Reinhardt" wrote:
First, I'm still on Excel 2003. I'm trying to programmatically open an
embedded excel object in PowerPoint 2003. My code works if the ProgID is
Excel.Sheet.8, but if it's Excel.Sheet.12, it's a no-go.
This is part of the code
For Each myShape In mySlide.Shapes
If myShape.Name Like "Object*" Then
Debug.Print mySlide.SlideIndex, myShape.OLEFormat.progID
If myShape.OLEFormat.progID Like "Excel*" Then
For Each myWS In myShape.OLEFormat.Object.Worksheets
'If the ProgID is Excel.Sheet.8, this works and I
find a myWS
'If the ProgID is Excel.Sheet.12, doesn't work.
'How do you suggest I proceed.
Next myWS
End if
End if
Next myShape
... and so on
|