PDA

View Full Version : Save dialog in ppt



penfold1992
02-14-2013, 05:08 AM
Im running a macro from excel which opens a powerpoint, inserts a bunch of graphs and texts and then to end the macro I want to open up a "Save As" window.

Set PPT = CreateObject("Powerpoint.Application")
With PPT.FileDialog(msoFileDialogSaveAs)
.InitialFileName = *(file location private)*
.AllowMultiSelect = False
.Show
End With
this is the code I am using and it appears to work but when I hit the save button... it doesnt seem to save at all for some reason.
does anyone have any idea as to why it doesnt save?

Doug Robbins
03-04-2013, 10:27 PM
The following opens a new presentation in PowerPoint and saves it with the name Test

Dim PPT As Object
Dim PPP As Object
Set PPT = CreateObject("Powerpoint.Application")
Set PPP = PPT.presentations.Add
PPP.SaveAs "C:\Users\Doug\Documents\Test"

If you don't want to hard code the name, you could use and InputBox to have the user enter it.