Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8145625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:43:28+00:00 2026-06-06T13:43:28+00:00

I am busy recreating a powerpoint with xml. i have added all the neccessary

  • 0

I am busy recreating a powerpoint with xml. i have added all the neccessary files but when i open the document in powerpoint, it says there is a problem with the content. is there any where where i can see more examples of working like this etc? here is a sample of how i am working with it:

 private static void SlideMaster1Xml()
    {
        FileStream slideMaster1stream = new FileStream(slideMaster1FilePath, FileMode.Create, FileAccess.Write);
        XmlWriter slideMaster1Writer = null;

        try
        {
            XmlWriterSettings contentTypesSettings = new XmlWriterSettings();
            contentTypesSettings.Indent = true;
            slideMaster1Writer = XmlWriter.Create(slideMaster1stream, contentTypesSettings);

            slideMaster1Writer.WriteStartDocument(true);
            slideMaster1Writer.WriteStartElement("p", "sldMaster", "http://schemas.openxmlformats.org/presentationml/2006/main");
            slideMaster1Writer.WriteAttributeString("xmlns","r",null ,"http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            slideMaster1Writer.WriteAttributeString("xmlns", "a",null, "http://schemas.openxmlformats.org/drawingml/2006/main");

            slideMaster1Writer.WriteStartElement("p", "cSld", null);
            slideMaster1Writer.WriteStartElement("p", "bg", null);
            slideMaster1Writer.WriteStartElement("p", "bgRef", null);
            slideMaster1Writer.WriteAttributeString("Idx", "1001");

            slideMaster1Writer.WriteStartElement("a", "schemeClr", null);
            slideMaster1Writer.WriteAttributeString("val", "bg1");
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "spTree", null);
            slideMaster1Writer.WriteStartElement("p", "nvGrpSpPr", null);
            slideMaster1Writer.WriteStartElement("p", "cnvPr", null);
            slideMaster1Writer.WriteAttributeString( "name", "" );
            slideMaster1Writer.WriteAttributeString("Id", "1");
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "cNvGrpSpPr", null);
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "nvPr", null);
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "grpSpPr", null);
            slideMaster1Writer.WriteStartElement("a", "xfrm", null);
            slideMaster1Writer.WriteStartElement("a", "off", null);
            slideMaster1Writer.WriteAttributeString( "y", "0" );
            slideMaster1Writer.WriteAttributeString("x", "0");
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("a", "ext", null);
            slideMaster1Writer.WriteAttributeString("cy", "0");
            slideMaster1Writer.WriteAttributeString("cx", "0");
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("a", "chOff",null);
            slideMaster1Writer.WriteAttributeString( "y", "0" );
            slideMaster1Writer.WriteAttributeString("x", "0");
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("a", "chExt",null);
            slideMaster1Writer.WriteAttributeString("cy", "0");
            slideMaster1Writer.WriteAttributeString("cx", "0");
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "sp",null);
            slideMaster1Writer.WriteStartElement("p", "nvSpPr",null);
            slideMaster1Writer.WriteStartElement("p", "cNvPr",null);
            slideMaster1Writer.WriteAttributeString( "name", "Title Placeholder 1" );
            slideMaster1Writer.WriteAttributeString("id", "2");
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "cNvSpPr",null);
            slideMaster1Writer.WriteStartElement("a", "spLocks",null);
            slideMaster1Writer.WriteAttributeString("noGrp", "1");
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "nvPr",null);
            slideMaster1Writer.WriteStartElement("p", "ph",null);
            slideMaster1Writer.WriteAttributeString("type", "title");
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "spPr",null);
            slideMaster1Writer.WriteStartElement("a", "xfrm",null);
            slideMaster1Writer.WriteStartElement("a", "off",null);
            slideMaster1Writer.WriteAttributeString( "y", "274638" );
            slideMaster1Writer.WriteAttributeString("x", "457200");
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("a", "ext",null);
            slideMaster1Writer.WriteAttributeString("cy", "1143000");
            slideMaster1Writer.WriteAttributeString( "cx", "8229600" );
            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("a", "prstGeom",null);
            slideMaster1Writer.WriteAttributeString("prst", "rect");

            slideMaster1Writer.WriteStartElement("a", "avLst",null);
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteEndElement();
            slideMaster1Writer.WriteEndElement();

            slideMaster1Writer.WriteStartElement("p", "txBody",null);
            slideMaster1Writer.WriteStartElement("a", "bodypr",null);
            slideMaster1Writer.WriteAttributeString("anchor", "ctr");
            slideMaster1Writer.WriteAttributeString("rtlCol", "0");
            slideMaster1Writer.WriteAttributeString("bIns", "45720");
            slideMaster1Writer.WriteAttributeString("rIns", "91440");
            slideMaster1Writer.WriteAttributeString("tIns", "45720");
            slideMaster1Writer.WriteAttributeString("lIns", "91440");
            slideMaster1Writer.WriteAttributeString("vert", "horz");

I have been through all the code a 100 times but cannot see what is wrong. any help will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T13:43:32+00:00Added an answer on June 6, 2026 at 1:43 pm

    A good tool for troubleshooting OOXML generation, is the Open XML SDK 2.0 Productivity Tool that comes with the Open XML SDK. It will validate the generated XML, and display what is wrong. Works for both 2007 and 2010 formats.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am busy writing my own collection type and need to have a function
I'm busy to enable login stuff via facebook oauth on my website, but the
I am busy working on this and thought I would put it our there.
Busy learning Ruby... the documentation have an example: hello world.count(lo, o) that return 2
SO busy with some code, and have a function which basically takes dictionary where
I'm busy with an asignment where i have to make a graphical interface for
I'm busy with a small, simple add-in, but the process seems massively complicated and
Im busy for a while now solving the following issue: I have a http://domain.com
I'm currently busy coding a hangman game in VB.NET. As a wordlist, I have
I'm busy with a simple application. It reads xml and puts the information in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.