View Single Post
 
Old 06-03-2015, 06:13 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 problem isn't that you are unfamiliar with Outlook, (you don't need to know anything about Outlook) but that you are unfamiliar with calling a procedure from your macro.

You don't need to make any changes to the Code I posted. Instead you should call it from your original macro that has the data you want to send. Put the macro in the same folder as your original macro that reads the text box(es) etc and then add a line to the original macro to write the string to the sub e.g.

Code:
Dim strMessage As String
    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
You can use 'Go Advanced' to attach your presentation, or if it exceeds the filesize limitation, upload the file somewhere e.g. dropbox or onedrive and post the link.
__________________
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