Hi All, who had an example of sending an email from an addin?

  • Thread starter Thread starter Mike M.
  • Start date Start date
I can't seem to remember.

OT but thought this might interest you, contrary to your own experiences though
it may be:

http://www.newscientist.com/news/news.jsp?id=ns99994852

And climbing back on topic again:

Wouldn't have been that Foley critter, would it?
The one what said:

========================================================================

Here is a sample I have used for some CBTs using Outlook 2000. Remember
that you need to set a reference to the Outlook 9.0 library (listed as a
comment in the first line or two). You need to change the e-mail address
and body message. Mine is based on variables captured in my CBT
presentation.

Any questions, holler! Here is the subroutine:

Sub MailThruOutlook()

' Remember you need to set a reference to Outlook.
' Click "Tools", "References", place a check next to "Microsoft Outlook 9.0
Object Library

On Error GoTo Err1
Dim OL As Outlook.Application
Dim Mail As MailItem

Set OL = CreateObject("Outlook.Application")
Set Mail = OL.CreateItem(olMailItem)
Mail.Recipients.Add "your e-mail address here"
Mail.Subject = "PowerPoint CBT Demo Reviewed"
Mail.Body = "I have reviewed the presentation. I scored " & Score * 100
& _
"% on the quiz." & Chr(10) & "First name: " & firstname & Chr(10) &
_
"Last name: " & lastname & Chr(10) & "SSN: " & SocialSecurityNumber
& Chr(10) & _
"My feedback is:" & strFeedback
Mail.Send
Set Mail = Nothing
Set OL = Nothing

MsgBox "You have successfully completed the PTT, Inc. PowerPoint Exam Demo.
Click the CLOSE button to exit this program.", vbOKOnly, "PPT Complete"
GoTo Complete
Err1:
MsgBox "An error has occurred. Please call Professional Training
Technologies, Inc. at 877-4PTTINC and report an error", vbOKOnly, "Error
Occurred"
Complete:
End Sub

--
Bill Foley, Microsoft MVP (PowerPoint)
Microsoft Office Specialist Master Instructor
www.pttinc.com
Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/
"Success, something you measure when you are through succeeding."



--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
It is not 100% reliable, but you can use the
mailto:[email protected]?subject=Special Email from PPT
format in a hyperlink to activate the 'default' mail program. It requires
user intervention to activate the hyperlink.

Is this what you were looking for?

--

Bill Dilworth
Microsoft PPT MVP Team
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
I've tried to do this several ways -
(this being sending an e-mail back to the author
after hitting a hyperlink - forgive me, but your
question was a bit cryptic).

The easiest way for me seems to be to hyperlink to a word file.
On the word file, you can ask all sorts of questions, plus give
directions on how to e-mail a word file. Also I give the e-mail address
and suggest that if they can't understand my directions on how to
e-mail a word file (I'm sure you can understand why ... )
that they just copy all the text in the file, click on the address
then paste it into the e-mail.
The results have been fine.
 
Ooohhh! That was a low blow Steve. You can't imagine the memories that
article dredged up. Hocking my favorite watch for treatment just one of
them.

Thanks for the idea. The machine I am using doesn't have Outlook installed
(Windows Server 2003). So what I did was install IIS SMTP service. Then I
can just format a text file properly and drop in the pickup folder and away
she goes!

Thanks for the memories and code.
 
Not really but I managed to figure out a method using SMTP services and it's
pickup folder.

Thanks for the suggestion Bill.
 
I posted before I was awake hence my cryptic message. I am normally more
loquacious but dropped that one on the run. I managed to figure out a
method using SMTP services (Windows Server 2003) and it's pickup folder.

Thanks for the suggestion Pdek.
 
Ooohhh! That was a low blow Steve.

Thought you'd enjoy that ...
Thanks for the idea. The machine I am using doesn't have Outlook installed
(Windows Server 2003). So what I did was install IIS SMTP service. Then I
can just format a text file properly and drop in the pickup folder and away
she goes!

Neet! Didn't know about that trick.
 
Back
Top