PDA

View Full Version : [SOLVED:] Email quiz data via PowerPoint



garyj
04-07-2014, 02:48 PM
I have PowerPoint 2010. I have tried a few suggestions, but seems the more I do the less of my other PP links and actions are working.
I am making an interactive training session where the user reads a section and then answers a quiz. At the end of the show, they press a button, "Submit data", which should then send the required data to myself.

Most of my clients are younger and may not have email programs on their computers. So I want a program that does not rely on Outlook or other computer resident programs.

What I need to email is a string that I can prepare... info as follows...

email from: myemail
email to: campemail
subject: mysubj
body text: mytextstring

no attachments, no other addresses, send and done...
Appreciate your help. Thanks

Gary

garyj
04-08-2014, 10:28 PM
Never mind.. I figured it out.. with a lot of help from Google of course....
Not sure it will work off any computer... but here goes :)


Private Sub SubmitEmail()Dim oSmtp As New EASendMailObjLib.Mail
oSmtp.LicenseCode = "TryIt"
oSmtp.FromAddr = myemailstring
oSmtp.AddRecipientEx "recipientemailatthisaddydotcom", 0

oSmtp.Subject = "My Module"
oSmtp.BodyText = mymsgstring

' Set SMTP server address to "", Do not set user authentication or SSL connection

oSmtp.ServerAddr = ""

If oSmtp.SendMail() = 0 Then
MsgBox "email was sent successfully!"
Else
MsgBox "failed to send email with the following error:" & oSmtp.GetLastErrDescription()
End If
End Sub

Oh yes and I downloaded EASendMailObj ActiveX Object 1.0 Type Library

John Wilson
04-09-2014, 06:43 AM
Are you sure that is goinmg to work on PC's that don't have the library installed?