MSDN Sample to Create Presentation makes empty presentation

Home Forums PresentationML MSDN Sample to Create Presentation makes empty presentation

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  Eric White 7 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #3731

    TerryS
    Participant

    Hi Eric,

    Hope you don’t mind this beginner question ?

    I am automating a work flow for a reporting system which includes the generation of a powerpoint presentation. I have seen your webcast on presentation templates, and suspect that I will eventually get to that level, but I am the very beginning and am just trying to generate my first presentation as a proof of concept.

    I am developing in VB using Visual Studio 2015, and using Version 2.5 of the XML SDK for Microsoft Office. I have development systems on a Windows10 platform and Windows7 platform.

    I have followed the MSDN sample “How to: Create a presentation document by providing a file name (Open XML SDK)” MSDN Link.

    The code builds ok and runs without error, but the generated presentation is blank, when I open the generated presentation there is one white slide with no visible content. I included a 2nd MSDN example that adds a page to the presentation, and a page does get added (power point indicates 2 pages) but both pages are blank.

    I have tried to use the Productivity Tool, but can’t find the problem. One thing that I did notice was that the Document Explorer view in the Productivity Tool looks a bit different than the screenshots from your webcasts. What is different is that there are no Icons in the Document Explorer tree view. This is true even if I open a presentation generated in Powerpoint.

    The productivity tool validates the generated document OK.

    Any clues on where to look for the problem?

    Thanks
    Terry

    #3738

    TerryS
    Participant

    As an update…
    I have tried using the MSDN Sample code for adding a slide, to to add a slide to an existing presentation.

    When I try to open the modified file, PowerPoint 2013 reports that that it has detected an error and will attempt a fix. The fix happens and a new slide is added.

    Any tips would be appreciated.

    Cheers
    Terry

    #3767

    Eric White
    Keymaster

    Hi Terry,

    I didn’t write that code, and don’t know any details about it. It is written in a style that is different from the way I write.

    I would take the approach that I showed in the screen-cast.

    Alternatively, you could use the OpenXmlRegex module to search/replace content in presentations.

    http://www.ericwhite.com/blog/blog/openxmlregex-developer-center/

    Cheers, Eric

    #3797

    TerryS
    Participant

    Thank Eric

    I guess I am looking for example of boiler plate code that generates a PowerPoint File, and the MSDN example produces an error.

    Do you have a small VS project that does a simple power point file generation you could share?

    thanks
    Terry

    #3800

    Eric White
    Keymaster

    Hi Terry,

    Have you seen this screen-cast:

    Generate Open XML Presentations using a Presentation Template

    Cheers, Eric

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.