PDA

View Full Version : Save file in destinated folder using VBA



marcvdpeet
09-25-2013, 12:36 AM
Dear all,

I'm looking for a code with which I can save I can save a powerpoint with a timestamp in a predefined folder. So it should be like:

- I press a shortcut
- I get a pop up box
- I press enter and file is saved.

I created an excel file for this (see below) but cant find how to do this in powerpoint. Anybody help on how I can do this?

Dear regards, Marc


Sub SAVEINFOLDER()

Dim FileName As String


FileName = InputBox("Geef hier je bestandsnaam aan")
FullName = team & "FILE.xls"



Const Path = "C:\Documents and Settings\aa471714\Desktop\TEST\"
ThisWorkbook.SaveAs Path & FullName

End Sub

mancubus
09-29-2013, 02:11 PM
welcome to the forum.

this may get you started:

http://www.vbaexpress.com/forum/showthread.php?34488-Solved-Creating-a-VBA-to-save-presentation

John Wilson
09-29-2013, 02:39 PM
You cannot use shortcuts in PPt

Tryt this code though

Sub SAVEINFOLDER()

Dim FileName As String
Dim saveName As String
Dim timeStamp As String

FileName = InputBox("Geef hier je bestandsnaam aan")
saveName = FileName & ".ppt"
timeStamp = Month(Now) & "-" & Day(Now) & "_" & Hour(Now) & "-" & Minute(Now) & "_"
Const Path = "C:\Documents and Settings\aa471714\Desktop\TEST\"
ActivePresentation.SaveAs Path & timeStamp & saveName
End Sub