ok, I give up, please help fix this macro code.

M

Mr . .

Good afternoon,

I have been trying to get this macro code to work in powerpoint show mode;
and would really appreciate some help.

Goal: send a three slide powerpoint show to an audience that did not attend
a training session. slide one is intro to training, slide two has the video
taped training session, slide three a link to either mouse over or click.

clicking or mousing over the link on slide three activates VB macro code to
send preformatted email to inform training official that the person
completed viewing the show.

Problem: VB macro works when viewing the three slides as a presentation,
but not a show. Mousing over the link activates the macro, which triggers
the outlook security window popup asking permission for outlook to send the
email. This pops up behind the show and is not visible. I'd like the code
to send the email and then close the show so the outlook security window is
visible.

Heres the code:

Sub Sendemail()

' Macro created 1/24/2006 by Mr.
Dim OL As Outlook.Application
Dim Mail As MailItem

Set OL = CreateObject("Outlook.Application")
Set Mail = OL.CreateItem(olMailItem)
Mail.Recipients.Add (e-mail address removed)
Mail.Subject = "Training powerpoint completed"
Mail.Body = "I completed viewing the required Training powerpoint
presentation. Please mark me as training complete."
Mail.Send
Set Mail = Nothing
Set OL = Nothing
' Quit PowerPoint.
Application.Quit
' Close the object variable.
Set appPowerPoint = Nothing


End Sub
 
A

Austin Myers

You say "show", I assume this means a pps? If so are you certin it is
PowerPoint playing it and NOT the viewer?


Austin Myers
MS PowerPoint MVP Team

Provider of PFCMedia http://www.pfcmedia.com
 
M

Mr . .

I went to slideshow menu, selected set up show, then selected show at a
kiosk. The file extension is .pps not .ppt I'm pretty certain that
powerpoint is playing it, but I may be wrong... what's the viewer?

Mr.
 
M

Mr . .

When I save the presenation normally it is a .ppt file when I save it for
viewing in a kiosk mode (show) it is saved as a .pps file format.

Opening the .ppt to view the file, the VB macro runs just fine.
Opening the .pps file to view, the VB macro does not close the show, so the
outllook security window is never visible, and since a 'show' locks the
keyboard, the viewer is stuck.

I need help fixing the code so it will close the show and allow the outlook
window to be visible.

Mr.
 
D

David M. Marcovitz

You might check out this FAQ entry:

Changing a File Association, Repairing broken File Associations
http://www.pptfaq.com/FAQ00355.htm

My guess is that your computer is set to open a .pps file using the
Viewer, which will not run a macro.

--David
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
M

Mr . .

I do not believe I have the viewer installed. I followed the instructions
on the linke below, just in case.

The macro does execute, I can modifiy it to do other things, but it just
does not close.

Should the close statement be changed from Application.quit to something
else?

Mr.
 
D

David M. Marcovitz

OK. It's not the Viewer if the macro does other things. Application.Quit
should do it, but you can also try
ActivePresentation.SlideShowWindow.View.Exit
--David


--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
J

jnelson

Mr . . wrote on 08/05/2006 14:15 ET
Good afternoon

I have been trying to get this macro code to work in powerpoint show mode
and would really appreciate some help

Goal: send a three slide powerpoint show to an audience that did not atten
a training session. slide one is intro to training, slide two has the vide
taped training session, slide three a link to either mouse over or click

clicking or mousing over the link on slide three activates VB macro code t
send preformatted email to inform training official that the perso
completed viewing the show

Problem: VB macro works when viewing the three slides as a presentation
but not a show. Mousing over the link activates the macro, which trigger
the outlook security window popup asking permission for outlook to send th
email. This pops up behind the show and is not visible. I'd like the cod
to send the email and then close the show so the outlook security window i
visible

Heres the code

Sub Sendemail(

' Macro created 1/24/2006 by Mr
Dim OL As Outlook.Applicatio
Dim Mail As MailIte

Set OL = CreateObject("Outlook.Application"
Set Mail = OL.CreateItem(olMailItem
Mail.Recipients.Ad
Mail.Subject = "Training powerpoint completed
Mail.Body = "I completed viewing the required Training powerpoin
presentation. Please mark me as training complete.
Mail.Sen
Set Mail = Nothin
Set OL = Nothin
' Quit PowerPoint
Application.Qui
' Close the object variable
Set appPowerPoint = Nothin


End Su
Try using this code

Sub email_somebody(

Dim olApp As Object, olMail As Objec
Set olApp = CreateObject("Outlook.Application"
Set olMail = olApp.CreateItem(0
olMail.To = "(e-mail address removed)
olMail.Subject = "Training Completion
olMail.Body = "(name or description) Training has been completed.

olMail.sen

End Su

You could also add script to the beginning to request a name, date, trainin
module description, etc... then add it to the body of the email so that th
recipient know's who it was that completed the training.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top