Share via

Insert PowerPoint Slide w/ Theme From File Using VSTO (C#)

Anonymous
2018-05-25T21:07:10+00:00

Is it possible to insert a new slide into an existing presentation, retaining the theme of both the new slide and the existing presentation?

For example, if I am editing Presentation A which uses Theme A and I insert a slide from Presentation B which uses Theme B, the end result should be that Presentation A now has the following slides:

Presentation A

  • Slide A (Theme A)
  • Slide B (Theme B)

When I attempt to do the following, the text from the slide file (Presentation B) is inserted into the existing Presentation A, but the graphics and formatting are not inserted:

var presentationA = Globals.ThisAddIn.Application.ActivePresentation;
presentationA.Slides.InsertFromFile(@"C:\\SlideTemplates\PresentationB.pptx", 0);

Here is what the Presentation B slide looks like (i.e., the slide I want to insert into the Presenation A):

B

But here is what it looks like once inserted:

I'm using Visual Studio 2017 and Office 2016 on Windows 10.

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. John Korchok 232.8K Reputation points Volunteer Moderator
    2018-05-27T16:14:47+00:00

    Please re-read the original post. They are inserting slides programmatically using C#, not manually.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Anonymous
    2018-05-26T23:18:24+00:00

    Hello ImNoScrub, it is a pleasure to assist you today.

    Indeed you can bring over the theme from one slide of a presentation to another with a different theme. Go to New Slide drop-down box > Reuse Slides > Browse file and search for the presentation you want the slide from > Select the presentation and open > Keep source formatting > Select the slide from the presentation by double-clicking.

    If you would like to change a slide to a different theme than the presentation, go to Design > Hover over the theme you want > right-click > Apply to Selected Slides

    Hope this helps!

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2018-05-25T21:13:18+00:00

    I suggest that you also post your question on the Microsoft TechNet forum. It has additional technical experts that may also help you.

    https://social.technet.microsoft.com/Forums/en-...

    If you post there, you will be posting on two forums and can get expert replies from both forums.

    Was this answer helpful?

    0 comments No comments