0

I have an active PowerPoint slide which is saved as following code in ppt Format;

PowerPointApp.ActivePresentation.SaveAs ThisWorkbook.Sheets("Vorgaben").Range("D6").Value & Replace(ThisWorkbook.Name, "xlsm", "ppt"), 1

I want it to be saved as same Name but in pptx Format. What should i do for this ?

David Rogers
  • 2,601
  • 4
  • 39
  • 84
Yigit Tanverdi
  • 161
  • 6
  • 18

1 Answers1

0

I would try something like this:

PowerPointApp.ActivePresentation.SaveAs ThisWorkbook.Sheets("Vorgaben").Range("D6").Value, ppSaveAsOpenXMLPresentation

It should save the PowerPoint document as a PPTX(see documentation, example)

Community
  • 1
  • 1
David Rogers
  • 2,601
  • 4
  • 39
  • 84
  • @YigitTanverdi Could you provide more detail on why it doesn't work, do you receive an error message? Does it fail silently? Is the saved file corrupted? – David Rogers Mar 22 '16 at 14:40
  • it doesnt give an error it just doesnt do anything. My PowerPoint is 2010 if thats important – Yigit Tanverdi Mar 22 '16 at 14:45
  • Have you checked in your "My Documents" folder, that's where it placed the saved file in the example I've run? – David Rogers Mar 22 '16 at 14:48
  • when this is done, PowerPoint file is already open, it has the Name as somename.ppt and not somename.pptx. shouldnt it be changed as pptx directly after this ? – Yigit Tanverdi Mar 22 '16 at 15:06
  • When I run my example it is, you can see the change in names in the title bar of PowerPoint(the new name ends with pptx), maybe their is some detail that I'm missing here, Could you add some more detail to your question, and could you also explain what the end goal is, i.e. what is the full purpose of your code? – David Rogers Mar 23 '16 at 15:10