Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Opening embedded Excel 2007 Object in a PPT presentation

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL 2007 Charts Presentation trip_to_tokyo[_3_] Charts and Charting in Excel 0 March 22nd 10 05:17 PM
Opening an embedded object in Excel 2007 Barbara B Excel Discussion (Misc queries) 0 June 25th 09 09:35 PM
Converting PDF from an Excel Embedded Object ReneeC Excel Discussion (Misc queries) 1 June 25th 09 09:05 PM
embedded presentation graphs in excel don't update, tables do sid Excel Worksheet Functions 0 October 4th 06 02:20 PM
Problem With Opening Embedded Object After Turning On "Track Chang John A Excel Discussion (Misc queries) 0 August 3rd 05 05:02 PM


All times are GMT +1. The time now is 09:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"