Consulting

Results 1 to 3 of 3

Thread: Creat a button that launches outlook and pastes in contents of answer slide

  1. #1

    Creat a button that launches outlook and pastes in contents of answer slide

    I am using PowerPoint to write interactive courses and have created assesment questions in the course that are scored. I have the presentation so that it creates a new slide with the results and has a button to return to home and start over, and a button to print the new slide. Both work fine. I want to add a button that would send the last slide to a specific email address. The reason for this is that we want to verify the scores people receive on the course before giving them access to an application. I have just been copying script from a book I bought and unfortunately there is nothing in there for this type of thing. Could someone help. Below is my script thus far which works fine for the start over button and the print button. Any help would be appreciated.

    [VBA]
    Sub PrintablePage()
    Dim printableSlide As Slide
    Dim homeButton As Shape
    Dim printButton As Shape

    Set printableSlide = _
    ActivePresentation.Slides.Add(Index:=printableSlideNum, _
    Layout:=ppLayoutText)
    printableSlide.Shapes(1).TextFrame.TextRange.Text = _
    "Results for " & userName
    printableSlide.Shapes(2).TextFrame.TextRange.Text = _
    "Your Answers" & Chr$(13) & _
    "Question 1: " & answer1 & Chr$(13) & _
    "Question 2: " & answer2 & Chr$(13) & _
    "Question 3: " & answer3 & Chr$(13) & _
    "You got " & numCorrect & " out of " & _
    numCorrect + numIncorrect & "." & Chr$(13) & _
    "Press the Print Results button to print your answers."
    Set homeButton = _
    ActivePresentation.Slides(printableSlideNum).Shapes.AddShape _
    (msoShapeActionButtonCustom, 0, 0, 150, 50)
    homeButton.TextFrame.TextRange.Text = "Start Again"
    homeButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
    homeButton.ActionSettings(ppMouseClick).Run = "StartAgain"
    Set printButton = _
    ActivePresentation.Slides(printableSlideNum).Shapes.AddShape _
    (msoShapeActionButtonCustom, 200, 0, 150, 50)
    printButton.TextFrame.TextRange.Text = "Print Results"
    printButton.ActionSettings(ppMouseClick).Action = ppActionRunMacro
    printButton.ActionSettings(ppMouseClick).Run = "PrintResults"
    ActivePresentation.SlideShowWindow.View.Next
    ActivePresentation.Saved = True
    End Sub
    Sub PrintResults()
    ActivePresentation.PrintOptions.OutputType = ppPrintOutputSlides
    ActivePresentation.PrintOut From:=printableSlideNum, _
    To:=printableSlideNum
    End Sub
    Sub StartAgain()
    ActivePresentation.SlideShowWindow.View.GotoSlide (1)
    ActivePresentation.Slides(printableSlideNum).Delete
    ActivePresentation.Saved = True
    End Sub
    [/VBA]

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    I don't know much about powerpoint but Emily has a script that sends the slide to word.....shouldn't be too much different. Take a look at it here or in the kb
    http://vbaexpress.com/forum/showthread.php?t=7931
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3

    need more guidance

    I looked at Emily's post but am not sure how to adapt it for use with outlook and sending only one slide of the ppt. file to outlook as an email attachment. I'd really like to just have a button that users can click on from their score sheet that would do all of this behind the scenes. Would take that slide and email it to me. Any help would be appreicated.

Posting Permissions

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