Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 696
  • Last Modified:

PowerPoint Default File Location

Experts:

In PowerPoint, how can I define both "default file location" and "default filename" through VBA.

I do >> NOT << want to use the  "Tools | Options | General" to set the default location.

Essentially, the spreadsheet (.POT) would be used by multiple individuals... they all have to save it to the same location with the same filename (thus replacing existing files in the default subfolder).

Ideally, there would be a macro button on the slide (.POT) ... once clicked the content of the .POT would then be saved as an .PPT without them even having to specify name/location.

Also, once the .PPT has been saved, the command button/macro button should be removed from the .PPT.

Is that doable?  If so, how can this be done via VBA?

EEH
0
ExpExchHelp
Asked:
ExpExchHelp
  • 2
  • 2
1 Solution
 
FlysterCommented:
Hello again. Going into new territory here, never did PowerPoint VBA. Try this; it seems to give the results you want. Just modify the path, file name and slide number that the command button appears on.
Private Sub CommandButton1_Click()

Application.DisplayAlerts = ppAlertsNone
  ActivePresentation.Slides(1).Shapes("CommandButton1").Delete
  Application.ActivePresentation.SaveAs "C:\Enter\Path\Here\YourFileName.ppt", ppSaveAsPresentation
Application.DisplayAlerts = ppAlertsAll

End Sub

Open in new window

Flyster
0
 
ExpExchHelpAuthor Commented:
Flyster

Wow... that works fabulous!!!

Thousand thanks for the prompt response.

EEH
0
 
FlysterCommented:
Glad I could help out!
0
 
JSRWilsonCommented:
How are you getting the command button to run the code though? It would only work in slide show view wouldn't it?
0
 
ExpExchHelpAuthor Commented:
@JSRWilson:

Correct... it only works in presentation mode.   I'm ok w/ that though.

EEH
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now