Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Feb 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting and Inserting a name

    I am quite new to PP (XP) but I have used VBA with word.

    I am trying to create an interactive quiz for an infant school, I want to
    get the childs name via InputBox and store the name in a public variable.
    At the end of the quiz I want to display a certificate with the childs name
    on it and the result.

    My Question is how do I take the stored name and insert it onto the
    certificate whilst the presentation is running.

    Thanks for any help Graham

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Getting and Inserting a name

    Have you thought of using Word? <img src=/S/innocent.gif border=0 alt=innocent width=20 height=20>

    PPT's VBA is something to <img src=/w3timages/censored.gif alt=censored border=0> about!

    Anyhow - it is an interesting question - Try connecting this macro to an action button that can be clicked during the presentation.
    <pre>Sub CollectName()
    Dim ChildName As String
    Dim CertSlide As Slide
    ChildName = InputBox("Enter your name", "Name")

    With ActivePresentation.Slides(2).Shapes.AddShape(msoSh apeRectangle, _
    Left:=150, Top:=150, Width:=200, Height:=50).TextFrame
    .TextRange.Text = ChildName
    .TextRange.Font.Name = "Arial Black"
    .TextRange.Font.Size = 40
    End With
    End Sub
    </pre>


    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    New Lounger
    Join Date
    Feb 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting and Inserting a name

    Hi Catherine
    Thanks for the reply, Yes I did think about using Word <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>.
    Your code will do what I needwhen fitted into the presentation. 1 question What were you doing with "dim certslide as slide"

    Thanks Graham

  4. #4
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Getting and Inserting a name

    Oops - left over from trying a different approach!

    Cheers
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  5. #5
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Getting and Inserting a name

    Take a look at MS MVP Shyam Pillai's Quiz in PowerPoint using VBA. PowerPoint's Object Model isn't that bad, they just took all the stuff that you hated and avoided in Word and moved it to PowerPoint! --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •