Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PowerPoint Default File Location

Posted on 2013-11-11
5
Medium Priority
?
676 Views
Last Modified: 2013-11-12
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
Comment
Question by:ExpExchHelp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 2000 total points
ID: 39640733
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
 

Author Closing Comment

by:ExpExchHelp
ID: 39640853
Flyster

Wow... that works fabulous!!!

Thousand thanks for the prompt response.

EEH
0
 
LVL 22

Expert Comment

by:Flyster
ID: 39640858
Glad I could help out!
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 39640885
How are you getting the command button to run the code though? It would only work in slide show view wouldn't it?
0
 

Author Comment

by:ExpExchHelp
ID: 39641306
@JSRWilson:

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

EEH
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

 Regular Expressions Microsoft Word has sophisticated search tools that can search for patterns. For example if you wanted to search for all UK phone numbers that followed a pattern of five digits, a space and then six digits you can easily do th…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This video teaches viewers how to add transitions to their Slideshows and how to set up timing for the transitions.
The viewer will learn how to edit animations within the presentation, incorporate sound, and set everything up with timing.

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question