VBA - options buttons in PPT

G

Guest

I am trying to use 4 options buttons. If you select Option Button1, then
click the Print button, 3 files will print. If you select Option Button2,
File 1 will print, if you select Option Button3, File 2 will print and if you
select Option Button3, File 3 will print. I'm assuming this will work with
the If... Then... ElseIf...

My question is about the Option Button 1 -- it is supposed to make 3 files
print. Can I just list these 3 files together? So far I only set it up to
print one file -- I wasn't sure how to make it print 3 files by just
selecting that one button. This is what I have so far - can I just say to
print "C:\FileName1.ppt, Filename2.ppt, Filename3.ppt"?

Private Sub CommandButton1_Click()
If OptionButton1.Value = True Then

Presentations.Open FileName:="C:\FileName1.ppt", ReadOnly:=True
With ActivePresentation.PrintOptions
.RangeType = ppPrintAll
.NumberOfCopies = 1
.Collate = msoTrue
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintBlackAndWhite
.FitToPage = msoFalse
.FrameSlides = msoFalse
.ActivePrinter = "hp LaserJet 1000"
End With
ActivePresentation.PrintOut
ActiveWindow.Close
SlideShowWindows(1).Activate
End If
 
G

Guest

So right before my End If I would then start repeat the code beginning with
"Presentations.Open FileName:=C:FileName2.ppt" ?

Thanks!
 
C

Chirag

Yes.

A couple of notes:
1. You might want to have the line "SlideShowWindows(1).Activate" only once
at the very end.
2. Assuming that you are closing the presentation using the
"ActiveWindow.Close" line, you might want to change it to
"ActivePresentation.Close".

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.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

Similar Threads


Top