View Single Post
 
Old 06-03-2015, 08:00 AM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The macro works as I said if you follow my instructions. Restore the macro from my original message in place of the one you altered and change the following macro as follows:

Code:
Sub results()
Dim strMessage As String
Dim ANSWERBOX As Object

Set tb = ActivePresentation.Slides(5).Shapes("ANSWERBOX")        '## Update this to use the correct name or index of the shapes collection ##'

    tb.Visible = True

    tb.TextFrame2.TextRange.Characters.Text = UserName & ", You scored " & NumberCorrect + NumberCorrect2 + NumberCorrect3 & " as follows:" & vbNewLine & "Q1 - " & NumberCorrect & vbNewLine & "Q2 - " & NumberCorrect2 & vbNewLine & "Q3 - " & NumberCorrect3

    strMessage = UserName & "has scored " & NumberCorrect + NumberCorrect2 + NumberCorrect3 & " as follows:" & vbNewLine & "Q1 - " & NumberCorrect & vbNewLine & "Q2 - " & NumberCorrect2 & vbNewLine & "Q3 - " & NumberCorrect3

    Send_As_Mail strTo:="projects@virtualservice.me", _
                 strSubject:="Quiz Response from" & UserName, _
                 strMessage:=strMessage

End Sub
If the body text of the message doesn't populate, make sure Outook is running before you begin.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote