Getting a saveas dialog box appear in active slideshow

G

Guest

I have tried this code
Sub saver()
presname = InputBox("Name your file")
ActivePresentation.SaveAs ("C:\Documents and Settings\John\Desktop\" &
presname)
End Sub

But i dont seam to be able to get a saveas dialog box appear when in an
active presentation, What i want is to be able to save an active presentation
so my class can do a quiz and be able to save it under there name and in a
specific directory any help will be much appreciated. Running office 2003 xp
 
S

Steve Rindsberg

I have tried this code
Sub saver()
presname = InputBox("Name your file")
ActivePresentation.SaveAs ("C:\Documents and Settings\John\Desktop\" &
presname)
End Sub

But i dont seam to be able to get a saveas dialog box appear when in an
active presentation, What i want is to be able to save an active presentation
so my class can do a quiz and be able to save it under there name and in a
specific directory any help will be much appreciated. Running office 2003 xp

Add an action button or draw something for them to click on.
Right click it, choose Action Settings, Run Macro and choose your macro
(the macro must be saved in the same file as the students will be running)
When they click the buttond during a slide show, it'll run your macro.

For it to work, the students must be running a full copy of PPT, not the free
viewer, and the macro security settings for their copy of PPT must permit
running macros.
 
G

Guest

Steve Rindsberg said:
Add an action button or draw something for them to click on.
Right click it, choose Action Settings, Run Macro and choose your macro
(the macro must be saved in the same file as the students will be running)
When they click the buttond during a slide show, it'll run your macro.

For it to work, the students must be running a full copy of PPT, not the free
viewer, and the macro security settings for their copy of PPT must permit
running macros.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

Cheers for that i have a command button on the screen and i have the code above active for that button but it doesnt work what is the macro i need to associate with the command box any more help will be much appreciated cheers
 
D

David M. Marcovitz

I don't think it is possible to get the Save As dialog box to come up.
Shyam had a workaround that was able to do this for versions 97 and 2000
of PowerPoint, but I don't think there is anything for newer versions.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
S

Steve Rindsberg

have a command button on the screen and i have the code above active for that button
but it doesnt work what is the macro i need to associate with the command box any more
help will be much appreciated cheers

Note: punctuation's free; big letters cost the same as lowercase ones. Let's use
them both as needed to help with legibility. Thanks.

Now, "doesn't work" could mean a lot of things. It might mean that nothing at all
happens, that something happens but it wasn't what you wanted, or that smoke and flames
erupt from the computer and carbonize the lifeform sitting at the keyboard. Or
something else. Help us out here. We can't see the problem other than through your
description.

By the way, if you're expecting a save as dialog to appear, it won't. Your macro tells
PPT to save the presentation to a certain filename in a certain folder. It does.
Other than the input box to get the file name, you won't see anything else happen.

In other words, maybe it's working.
 
G

Guest

Nothing is happening at all. Would it be possible for 20 people to save
there work in the same directory under different names but from a active
running power point sideshow.
 
S

Steve Rindsberg

Nothing is happening at all. Would it be possible for 20 people to save
there work in the same directory under different names but from a active
running power point sideshow.

If they all have access to the same directory, yes.
Things get a bit dicier if they're all running the same copy of the
presentation. I'm not sure what'd happen in that case, but wouldn't recommend
it.

Let's worry first about whether the macro is even running.
Try changing it to this:

Sub saver()
MsgBox "Running Saver macro"
On Error GoTo ErrorHandler
Dim presname as string

presname = InputBox("Name your file")
ActivePresentation.SaveAs _
("C:\Documents and Settings\John\Desktop\" _
& presname)
MsgBox "Saved as presname"

NormalExit:
Exit Sub

ErrorHandler
MsgBox Err.Description
Resume NormalExit
End Sub
 
S

Steve Rindsberg

Do i put this code in the save button i have created

Replace the existing code you already *have* with the changed version I posted
below.

But when you say "button" ... what type of button do you have and how have you put
code "in" it?
 
G

Guest

The button i have used is a command button and i put the code in by double
left clicking which opened up the VB editor
 
S

Steve Rindsberg

The button i have used is a command button and i put the code in by double
left clicking which opened up the VB editor

As I say, substitute the sample code you posted before with the revised version below.

Let us know what happens.
 
G

Guest

That didnt work, nothing happened i pasted the code in the print command
button. Do i have to record a macro first
 
S

Steve Rindsberg

That didnt work, nothing happened i pasted the code in the print command
button. Do i have to record a macro first

If nothing happened, then something's preventing the code from running.

I think I mentioned before that your macro security settings have to be set to
medium or low. Also, these buttons will only work in slide show view, not in
normal or any other view. And only in full PPT, not the viewer.
 
G

Guest

I am trying it in active mode and full ppt and i also have the security
settings set to low any ideas
 
S

Steve Rindsberg

I am trying it in active mode and full ppt and i also have the security
settings set to low any ideas

I don't know what you mean by "active mode".

Buttons like the one you're using will only work in slide show mode; that is, when
you choose View, Slide Show.
 
G

Guest

Slide show mode is what i mean by active

Steve Rindsberg said:
I don't know what you mean by "active mode".

Buttons like the one you're using will only work in slide show mode; that is, when
you choose View, Slide Show.


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
G

Guest

I appreciate all your help its not such i big issue no as i have handed the
assignment cheers for all your help
 

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