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 9142839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:52:36+00:00 2026-06-17T09:52:36+00:00

I am making an C# application from I create powerpoint presentations . I wish

  • 0

I am making an C# application from I create powerpoint presentations. I wish to apply theme to my presentation programatically. I have got the theme list using the following code. But how could I get to apply them on an active presentation?

String programfilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
String msOfficePath = "Microsoft Office\\Document Themes 14";
String fullPath = Path.Combine(programfilesPath, msOfficePath);
String[] fileEntries = Directory.GetFiles(fullPath, "*.thmx", SearchOption.TopDirectoryOnly);

Any idea how to proceed?

  • 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-17T09:52:37+00:00Added an answer on June 17, 2026 at 9:52 am

    I just found a few good examples:

    1. Create PowerPoint programmatically
    2. Apply Theme PowerPoint 2010

    When combining those two guides it all comes to this

    using PowerPoint = Microsoft.Office.Interop.PowerPoint;
    using Core = Microsoft.Office.Core;
    // ...
    
    // create application object
    PowerPoint.Application pptApplication = new PowerPoint.Application();
    
    PowerPoint.Slides slides;
    PowerPoint._Slide slide;
    PowerPoint.TextRange objText;
    
    // Create the Presentation File
    PowerPoint.Presentation pptPresentation = pptApplication.Presentations.Add(Core.MsoTriState.msoTrue);
    
    // APPLY THEME - for example Clarity.thmx or 
    // anything within Microsoft Office\Document Themes 14    
    pptPresentation.ApplyTheme(@"C:\Program Files (x86)\Microsoft Office\Document Themes 14\Clarity.thmx");
    
    PowerPoint.CustomLayout customLayout = pptPresentation.SlideMaster.CustomLayouts[PowerPoint.PpSlideLayout.ppLayoutText];
    
    // Create new Slide
    slides = pptPresentation.Slides;
    slide = slides.AddSlide(1, customLayout);
    
    // Add title, modify content and so on ...
    objText = slide.Shapes[1].TextFrame.TextRange;
    objText.Text = "hello world";
    objText.Font.Name = "Verdana";
    
    pptPresentation.SaveAs(@"c:\yourPPT.pptx", PowerPoint.PpSaveAsFileType.ppSaveAsDefault, Core.MsoTriState.msoTrue);
    
    pptPresentation.Close();
    pptApplication.Quit();
    GC.Collect();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create JSON from Sqlite database in a iphone application. I have
I'm making Memo web application. and the main page contain 'Create and List and
I am making a document based application using CoreData. I can create a new
I'm having a weird problem with making an SFML2 application. I'm using Clang++ from
I am making and application to send data using sockets from an android device
I am making application where phone mode will changes from silent mode to ringer
I am making an application that involves controlling Safari from Applescript. Is there a
I'm making chat application and read messages data from SQLite database. I want to
I am making an application in Python which collects data from a serial port
I am making an application (iPhone app) which gets information (jokes) from an RSS

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.