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.
 
S

Steve Rindsberg

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.

This part puzzles me:
Problem: VB macro works when viewing the three slides as a presentation,
but not a show.

How do you distinguish between viewing the slides "as a presentation" vs "as a
show"?



Mousing over the link activates the macro, which triggers
 
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/
 
S

Steve Rindsberg

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.

Kiosk mode and whether you save as PPS or PPT have nothing to do with one
another.

And a PPT is identical to a PPS ... the only difference is the last letter of
the filename.
Opening the .ppt to view the file, the VB macro runs just fine.

But are you viewing the show in slideshow view or some other?
 

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