none
PowerPoint slides on SharePoint slides are deleted in the presentation during opening from Excel with VBA and saved automatically (uncoded & unwanted!) RRS feed

  • Question

  • Hallo,

    I run a VBA macro from Excel that has to open PowerPoint presentations on SharePoint, read something from a slide and write it to Excel.

    The Makro ran on a Windows 10 VM  for some weeks without any issue, but one morning all presentations suddenly contained no slides anymore. On my Windows 7 Laptop the macro still runs fine...

    The VM runs with Office 2013 Standard (15.0.4963.1000) MSO (15.0.5023.1000) 32-Bit

    The relevant VBA lines:

    Dim oPPTApp As PowerPoint.Application
    Dim oPPTFile As PowerPoint.Presentation

    [...]

    Set oPPTApp = CreateObject("PowerPoint.Application")
    oPPTApp.Visible = msoTrue

    Set oPPTFile = oPPTApp.Presentations.Open(Filename:=PresFile)

    Here the presentation pens and contains no slides anymore and is already saved on the SharePoint...

    Has someone a similar Problem and knows a solution/Workaround?

    BR

    Björn Wagner

    Tuesday, June 5, 2018 2:34 PM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel features, I'll move your question to the MSDN forum for Excel

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Emi


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Wednesday, June 6, 2018 7:34 AM
  • Hello Björn Wagner,

    Does these slides indeed deleted or just they does not show this time? If you manually open the presentation again, will any slide remain in the presentation?

    It seems that you are operating presentations stored on SharePoint so far. What's the result if you do the operation on a presentation stored in local machine?

    Besides, the latest version for Microsoft Office 2013 is 15.0.5031.1000. I would suggest you update your Office to latest version for testing.

    Best Regards,

    Terry


    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, June 6, 2018 9:45 AM
  • Hello Terry,

    thanks for your reply!

    Does these slides indeed deleted or just they does not show this time?
    -->They are deleted immediately and saved on the SharePoint at the momemt "Set oPPTFile = oPPTApp.Presentations.Open(Filename:=PresFile)" is executed

    If you manually open the presentation again, will any slide remain in the presentation?
    -->If I open the presentation afterwards manually they do not contain any slides, file size of the *.pptm is 0kb

    It seems that you are operating presentations stored on SharePoint so far. What's the result if you do the operation on a presentation stored in local machine?
    -->On a local machine or mapped network drive the error does not occur. If I open *.pptx from a slide library there is also no issue, just from the *.pptm in the document library

    Besides, the latest version for Microsoft Office 2013 is 15.0.5031.1000. I would suggest you update your Office to latest version for testing.
    -->Updates cannot be installed by me, they are managed centrally.

    BR
    Björn

    Wednesday, June 6, 2018 8:21 PM
  • Hello Björn,

    You said that the macro has worked server weeks. I think the original code is OK. There are must be some changed caused this issue.

    Do you update the code recently?

    Do you update windows recently?

    Do you update the document library recently? What's the result of you try to open a presentation with slides?

    Best Regards,

    Terry


    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.

    Thursday, June 7, 2018 5:33 AM
  • Hi Bjorn,

    >>Here the presentation pens and contains no slides anymore and is already saved on the SharePoint

    Based on your current code, it should not delete the presentations and save it back to SharePoint.

    I suggest you make tests below:

    1. Create a new PowerPoint with slides in SharePoint

    2. Open it manually on this issue computer, will it show correctly?

    3. Open the ppt from your Excel VBA code, will it delete the slides?

    Best Regards,

    Tao Zhou


    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.

    Thursday, June 7, 2018 6:31 AM
  • Hi Tao Zhou,

    As aöready stated:
    If I open it manually on this issue Computer it shows correctly

    If I open the ppt from Excel VBA Code the slides are deleted and presentation is saved at the Moment the Code to open is executed

    Thursday, June 7, 2018 5:40 PM
  • I could not think out any element will cause this issue.

    I suggest you disable all the VSTO or Com Add-In in Excel and PowerPoint, will this issue be reproduceable?

    Best Regards,

    Tao Zhou


    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 8, 2018 5:44 AM
  • Hello,

    I implemented a workaround:

    I copy the presentationsa to the Win 10 harddrive and open the presentations there. Not nice, but it works!Thank you for your thoughts!

    BR

    Björn

    Thursday, June 14, 2018 9:49 AM
  • Hello BjoernTheWagner,

    Glad to hear that your issue has been resolved. I would suggest you mark your solution as answer so other developers who runs into the same issue will find the solution helpful. If you have any other issue, please feel free to post to let us know.

    Best Regards,

    Terry


    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 22, 2018 6:37 AM