Skip to content

Instantly share code, notes, and snippets.

@ateneva
Last active August 2, 2018 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ateneva/5484fc1bd5978615991eb33f0dec9c9c to your computer and use it in GitHub Desktop.
Save ateneva/5484fc1bd5978615991eb33f0dec9c9c to your computer and use it in GitHub Desktop.
How do I quickly save a presentation under a new name and file extension?
Sub S()
Dim Ppres As Presentation
Set Ppres = ActivePresentation
Dim location As String
'~~~~~~~~~~~~saving in a location specified by us~~~~~~~~~~~~~~~~~~~~~
location = "C:\Users\Angelina\Review\MonthlyReview.pptx"
Ppres.SaveAs FileName:=location, FileFormat:=ppSaveAsDefault
'~~~~~~~~~~~saving in the same location as the exisitng presentaton
'~~~~~~~~~~~with a date 1 month back in the name~~~~~~~~~~~~~~~~~~~~~
Ppres.SaveAs FileName:=Left(Ppres.FullName, Len(Ppres.FullName) - 5) _
& "_" & Format(DateAdd("m", -1, Date), "mmm") & ".pptx"
Ppres.Close
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment