Make Save dialog box appear

K

kimkom

Hi all,

Is there a way to make the save dialog box appear before ending a PPS show?

I know you can by pressing Escape and the PPS has changed in some way, but I
need to show it after pressing a button on a slide.

Currently I'm using:

Sub ExitPPS()
ActivePresentation.Save
ActivePresentation.Close
End Sub

This just saves without giving the user the option though, not what I need
really.

Any advice?

Thanks,
Michael
 
J

John Wilson

kimkom said:
Hi all,

Is there a way to make the save dialog box appear before ending a PPS
show?

I know you can by pressing Escape and the PPS has changed in some way, but
I
need to show it after pressing a button on a slide.

Currently I'm using:

Sub ExitPPS()
ActivePresentation.Save
ActivePresentation.Close
End Sub

This just saves without giving the user the option though, not what I need
really.

Any advice?

Thanks,
Michael
 
J

John Wilson

I ask because you can call the save as dialg by executing the relevant
command bar BUT pps files don't have an edit mode and therefore no command
bars!

You will need to display the save as dialog and write code to sve yor file
based on what is entered.

It would look like this:

Sub saveme()
Dim fDlg As FileDialog
Dim strName As String
Set fDlg = Application.FileDialog(msoFileDialogSaveAs)
With fDlg
.AllowMultiSelect = False
.Title = "Please Save"

If .Show = True Then
strName = .SelectedItems(1)
Else
ActivePresentation.Close
Exit Sub
End If

End With
With ActivePresentation
..SaveAs strName
..Close
End With
End Sub

--
______________________
john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 
K

kimkom

Thank you John, that does the trick.

Michael

John Wilson said:
I ask because you can call the save as dialg by executing the relevant
command bar BUT pps files don't have an edit mode and therefore no command
bars!

You will need to display the save as dialog and write code to sve yor file
based on what is entered.

It would look like this:

Sub saveme()
Dim fDlg As FileDialog
Dim strName As String
Set fDlg = Application.FileDialog(msoFileDialogSaveAs)
With fDlg
.AllowMultiSelect = False
.Title = "Please Save"

If .Show = True Then
strName = .SelectedItems(1)
Else
ActivePresentation.Close
Exit Sub
End If

End With
With ActivePresentation
.SaveAs strName
.Close
End With
End Sub

--
______________________
john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top