none
PowerPoint creation RRS feed

  • Question

  • Hi all,

    I have a PowerPoint which displays the Organisational Chart.Now when I open the PowerPoint in the OpenXML SDk,I see many components which have been used to build the PowerPoint(in the Document Explorer) and the corresponding Reflected code.

    I want to learn how I can use the Reflected code to regenerate the PowerPoint.The basic objective is to use this code to generate PowerPoint with Org Chart capabilities.

    Thanks in advance,

    Vishnu

    Monday, March 21, 2011 10:43 AM

Answers

  • Hi Vishnu,

    Thank you for posting and we are glad to help with you.

    After reading your post, I knew you want to create the PowerPoint file via Open XML SDK and the reflection code in Open XML Productivity Tool. As far as I know, you can take the following steps:

    1. Create a console application and add a class named GenerateClass;

    2. Copy all the reflection code to GenerateClass;

    3. Add the below code to Program.cs:

    using System;
    using GeneratedCode;

    namespace OpenXmlUsePowerPointOpenXmlReflectionCode
    {
        class Program
        {
            static void Main(string[] args)
            {
                GeneratedClass gen = new GeneratedClass();
                gen.CreatePackage(AppDomain.CurrentDomain.BaseDirectory+"test.pptx");
            }
        }
    }

    Then, you can get the generated file test.pptx.

    I hope this can help you and just feel free to follow up after you have tried.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Bruce Song Monday, April 4, 2011 1:11 AM
    Tuesday, March 22, 2011 6:41 AM

All replies

  • Hi Vishnu,

    Thank you for posting and we are glad to help with you.

    After reading your post, I knew you want to create the PowerPoint file via Open XML SDK and the reflection code in Open XML Productivity Tool. As far as I know, you can take the following steps:

    1. Create a console application and add a class named GenerateClass;

    2. Copy all the reflection code to GenerateClass;

    3. Add the below code to Program.cs:

    using System;
    using GeneratedCode;

    namespace OpenXmlUsePowerPointOpenXmlReflectionCode
    {
        class Program
        {
            static void Main(string[] args)
            {
                GeneratedClass gen = new GeneratedClass();
                gen.CreatePackage(AppDomain.CurrentDomain.BaseDirectory+"test.pptx");
            }
        }
    }

    Then, you can get the generated file test.pptx.

    I hope this can help you and just feel free to follow up after you have tried.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Bruce Song Monday, April 4, 2011 1:11 AM
    Tuesday, March 22, 2011 6:41 AM
  • Hi Vishnu,

    Have you got an idea to resolve your problem yet?Does the suggestion work for you or not? If you still show any concern on this post, just feel free to follow up.

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 30, 2011 10:58 AM