Stack Exchange
OpenXML: while creating power point in c#
I'm using below code, in this code PowerPointTemplate() giving error i.e
PowerPointTemplate() not showing in intellisense as this should be in openXML
public class PowerPointParameter
 {
    public string Name { get; set; }
    public string Text { get; set; }
    public FileInfo Image { get; set; }
 }
        var templ = new PowerPointTemplate();
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "[#Paragraph1#]", Text = "Slide 1" });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "[#Paragraph2#]", Text = "Slide 2" });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "[#List1(string[])#]", Text = "test1 \n test 2 \n test3 \n test 2" });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "[#List2(string[])#]", Text = "test1 \n test 2 \n test3 \n test 2" });

        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "1", Image = new FileInfo(GetRootPath() + @"\Images\1.jpg") });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "2", Image = new FileInfo(GetRootPath() + @"\Images\2.jpg") });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "3", Image = new FileInfo(GetRootPath() + @"\Images\3.jpg") });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "4", Image = new FileInfo(GetRootPath() + @"\Images\4.jpg") });
        templ.PowerPointParameters.Add(new PowerPointParameter() { Name = "5", Image = new FileInfo(GetRootPath() + @"\Images\5.jpg") });

        var templatePath = GetRootPath() + @"\Templates\Template.pptx";
        var outputPath = GetRootPath() + @"\Output\Document.pptx";

P.S: i've added OpenXML and WindowsBase as well.
http://www.dotnet-geek.co.uk/index.php/openxml-power-point-templates-processing/#comment-576


PowerPointTemplate() not showing in intellisense as this should be in openXML

if possible then please open dotnet-geek link to know more

Is this your code as it is in your IDE (e.g. Visual Studio)? Because from var templ = new PowerPointTemplate(); onwards, the code is not in a class or member, which would explain your errors.

as dotnet-geek link, people have had executed this code. BUT i'm facing this error

Every this fine. Only you need to download one library from google library name :
DocumentFormat.OpenXml.dll
I was also very confused about this just download and link to your project

The lack of formatting, a verb and punctuation makes this very confusing.

Yes. I mean Everythings is very simple. You need to install DocumentFormat.OpenXml.dll.
