Macro to print textbox?

G

Guest

I inserted a "TextBox" (on slide 34) from the Control Toolbar so that the
user can enter a brief paragraph during the slideshow. Id like to print the
paragraph the user wrote on the printable slide. The "Textbox" on slide 34
is an "Active TextBox" (rather than a shape) inserted from the "Control
Toolbox".

Im guessing that I have to insert a macro for the "textbox", as well as a
macro for the Printable slide. Ive tried the folllowing, but its not
working! Any suggetions?

Thanks...

MACRO attached to textbox on slide 34:

Dim Report As String

Sub TextBox1_Change()
Report = TextBoxinput
End Sub

MACRO for printable slide:

Dim userName As String
Dim Report As String

Sub PrintablePage()
Dim printableSlide As Slide

Set printableSlide = ActivePresentation.Slides.Add(Index:=86, _
Layout:=ppLayoutText)
printableSlide.Shapes(1).TextFrame.TextRange.Text = _
userName & "'s" & " Description of Incident"
printableSlide.Shapes(2).TextFrame.TextRange.Text = _
Report
 
G

Guest

Hi Nikki
Have noticed your question has been posted before. I am a novice at VBA so
cannot comment on your coding, but have found the following most helpful and
they may answer your queries.
To copy data from a control textbox to another see answer by Bill Foley in
thread dated 12/15/04; search for Control Text Boxes and scroll down to
‘Replicate text entered..’
To customize the new text box see:
http://www.soniacoleman.com/Tutorials/PowerPoint/notes_page.htm and to print
the current slide in a show see: http://skp.mvps.org/ppt00040.htm#6
What I would now like help with is how to print 2 such slides per page! 1
page is rather wasteful.
Hope this is of some help
Cheers, Anne
 
G

Guest

Thank you for the suggestion, I will check them out.

To answer your question, if Im understanding it correctly, you want to print
two slides on one piece of paper? If so,

Select "Print..." from the File menu, then change "Print What" to "Handouts"
then Change "Slides per Page" to "2". This should print out two slides on
one page. Hope that helps...

Thanks again,

Nikki
 
G

Guest

Annie,

I forgot to add that you can print 2 different slides on one page. For
example, if you wanted to only print slide #1, and slide#7, Do the same as
before, but select "Slides" in the "Print Range" box and enter "1,7" in the
space provided.

I hope that answers your question, Im not sure if your asking for this type
of answer or some sort of VBA code to do this!

Thanks again...
 
G

Guest

Hi Nikki
I am working on a presentation which requires the user to enter data into
control text boxes on several slides. I need to set up a macro with VBA to
print specific slides eg 12 & 20 etc while the presentation is still running
and I want these to be printed 2 slides per page.
Anne
 
D

David M. Marcovitz

Nikki,

I'm back although not with very much time. I think I have the answer. In
your regular module (probably named Module 1), declare your report
variable:

Public Report as String

In your slide 34 module (created when you drew the control toolbox and
double-clicked on it):

Private Sub TextBox1_Change()
Report = TextBox1.Text
End Sub

Then your code in the PrintablePage procedure (back in your main module)
should work fine:

printableSlide.Shapes(2).TextFrame.TextRange.Text = _
Report

I'm pretty sure that this should work for you just like you want. I knew
it would be easy (it took me more time to type this response than to
figure out the answer). Let us know if you have any more questions.

--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.loyola.edu/education/PowerfulPowerPoint/
 

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