none
PowerPoint: How can I get the container Presentation for an embedded presentation RRS feed

  • Question

  • Hi all;

    I didn't see a PowerPoint forum so I'm posting here. If this is the wrong place please let me know.

    I have a COM (not VSTO) AddIn. In it, when the presentation is embedded in another presentation, the property Presentation.Container throws a COM exception when called. This does work in Word BTW.

    How can I get the Presentation object of the containing presentation?

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Thursday, May 17, 2018 2:29 PM

Answers

  • From Microsoft (MSDN ticket):

    I would like to inform you that it seems like there is no way to get the container of embedded Power Point inside Power Point application.

    I had discussed with my escalation and he informed me “PowerPoint's OLE server (which implements IOleObject) and Automation document (Presentation) are different objects. We will not be able to get to the IOleObject using automation document (presentation)”.

    Unfortunately, we don't see any way to get to PPT's OLE server from object model or other approaches. we don't see any way to achieve “Get the container Presentation for an embedded presentation”.


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    • Marked as answer by DavidThi808 Wednesday, August 8, 2018 2:14 PM
    Wednesday, August 8, 2018 2:14 PM

All replies

  • Hi Dave,

    I am looking into this issue, it may take some time and I will be back if there is any updates.

    Sorry for the inconvenience.

    Regards & Fei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 21, 2018 1:05 AM
    Moderator
  • Hi Dave,

    I am able also reproduce this issue too. And till need time to investigate this issue.

    And as a workaround, we can get host presentation by using the index of presentations collection if you want to get the parent presentation of embed presentation. Since the parent presentation should be the first presentation opened, you can refer the code below( The start index is 1):

    pptApp.Presentations[1]

    Hope it is helpful

    Regards & Fei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 23, 2018 5:13 AM
    Moderator
  • Unfortunately that won't work if I open 2 or more presentations and then open an embeded presentation in the 2nd presentation.

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Wednesday, May 23, 2018 12:17 PM
  • Hi;

    Any solution yet? It's been 49 days.

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Saturday, June 9, 2018 9:12 PM
  • Hi Dave,

    The relative issue already escalated to the team more familiar with this issues. Refer the post here.

    Regards & Fei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, June 11, 2018 12:54 AM
    Moderator
  • The link you listed is my asking a similar question for Excel. But that's a different problem (and no answer there yet either).

    Can you please ask the Office team again?

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Thursday, June 14, 2018 10:34 PM
  • Hi David,

    The issue should be similar with the preview post( COM exception when get the container) . And for the this issue, the relative team is already working on it, however there is still no root cause for this issue. 

    I will keep following this issue and update here if there is any update.

    Thanks for your understanding.

    Regards & Fei


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 15, 2018 6:01 AM
    Moderator
  • Example at https://www.dropbox.com/s/sylt9mbq12r5ure/ExampleAddIn.zip?dl=0

    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Wednesday, July 11, 2018 8:03 PM
  • From Microsoft (MSDN ticket):

    I would like to inform you that it seems like there is no way to get the container of embedded Power Point inside Power Point application.

    I had discussed with my escalation and he informed me “PowerPoint's OLE server (which implements IOleObject) and Automation document (Presentation) are different objects. We will not be able to get to the IOleObject using automation document (presentation)”.

    Unfortunately, we don't see any way to get to PPT's OLE server from object model or other approaches. we don't see any way to achieve “Get the container Presentation for an embedded presentation”.


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    • Marked as answer by DavidThi808 Wednesday, August 8, 2018 2:14 PM
    Wednesday, August 8, 2018 2:14 PM