none
PowerPoint 2010 VBA : Slides from Outline RRS feed

  • Question

  • I tried to find a way to create new slides from outlines and found no help in the forums or references. Well I figured part of it out myself. PowerPoint opens a text file as a new presentation.

    Set newPresentation = Presentations.Open("D:\Slides.txt", ReadOnly:=msoFalse, Untitled:=msoCTrue, WithWindow:=msoCTrue)

    I'm still trying to figure out how to insert the text file into an existing ppt. Manually it is done this way: Home > Slides > New Slide (arrow) > Slides from Outline.

    Many thanks in advance!

    P.S. Obvious workaround is to use a template:

    newPresentation.ApplyTemplate "D:\Temp.potm"




    • Edited by olliTee Thursday, July 17, 2014 11:44 AM Partial solution
    Thursday, July 17, 2014 11:36 AM

Answers

  • Hi OlloTee,

    Please try:

    ActivePresentation.Slides.InsertFromFile "D:\Slides.txt", ActivePresentation.Slides.Count

    I have tested the code in PowerPoint 2013, it works fine as we insert a slide from outline.

    For more information, please refer to Slides.InsertFromFile Method (PowerPoint).

    Hope this helps.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by olliTee Friday, July 18, 2014 8:27 AM
    Friday, July 18, 2014 6:56 AM
    Moderator

All replies

  • Hi OlloTee,

    Please try:

    ActivePresentation.Slides.InsertFromFile "D:\Slides.txt", ActivePresentation.Slides.Count

    I have tested the code in PowerPoint 2013, it works fine as we insert a slide from outline.

    For more information, please refer to Slides.InsertFromFile Method (PowerPoint).

    Hope this helps.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by olliTee Friday, July 18, 2014 8:27 AM
    Friday, July 18, 2014 6:56 AM
    Moderator
  • George,

    This works also in PowerPoint 2010. Many thanks! The reference library is just what I was looking for.

    Olli

    Friday, July 18, 2014 8:31 AM