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

Tech-Archive recommends: Fix windows errors by optimizing your registry



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/

"Mr . ." <deletedalready@xxxxxxxxxxxxxxxxxx> wrote in
news:aN1Cg.8097$gY6.2916@xxxxxxxxxxxxxxxxxxxxxxxxxx:

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.

"David M. Marcovitz" <marcoNOSPAM@xxxxxxxxxx> wrote in message
news:Xns981969E756EC6marcoNOSPAMloyolaedu@xxxxxxxxxxxxxxxx
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/

"Mr . ." <deletedalready@xxxxxxxxxxxxxxxxxx> wrote in
news:8EPBg.1932$1f6.122@xxxxxxxxxxxxxxxxxxxxxxxxxx:

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.

"Steve Rindsberg" <abuse@xxxxxxxxxxxxx> wrote in message
news:VA.00002a04.386f5e03@xxxxxxxxxxxxxxxx
In article <qf5Bg.3175$kO3.1484@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Mr .
. wrote:
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
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 thecorrectemail@xxxxxxxxx
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


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================










.



Relevant Pages

  • Re: Is it possible to open powerpoint from a slideshow macro?
    ... What Steve and Sonia said and ... ... in the Viewer. ... regular PowerPoint. ... >> I want to know if it's possible to use VBA (macro) to open PowerPoint ...
    (microsoft.public.powerpoint)
  • Re: [VBA] loop, problem of 101st iteration
    ... but there is something wrong with powerpoint application. ... Declare a string variable (I'll use strFile). ... In the Visual Basic editor in Excel, set a Watch to break on i=101, and ... Then run the macro (if you haven't used ...
    (microsoft.public.excel.programming)
  • Re: Creating a Non-Editable PPT Slideshow
    ... This method works great with full up PPT or with the old viewer. ... Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! ... Create and save your presentation as a PPS file. ...
    (microsoft.public.powerpoint)
  • Re: Print Macro (VBA) on Report
    ... > viewer,not the whole powerpoint file as i do not want the viewers to access ... I only want the macro to bring up the print dialog box on the ... If you send me a presentation and the viewer, I'll still be able to open the ... presentation (or PPT show, doesn't matter) in *my* copy of PowerPoint. ...
    (microsoft.public.powerpoint)
  • Re: ok, I give up, please help fix this macro code.
    ... Changing a File Association, Repairing broken File Associations ... Author of _Powerful PowerPoint for Educators_ ... Opening the .ppt to view the file, the VB macro runs just fine. ... Mail.Body = "I completed viewing the required Training ...
    (microsoft.public.powerpoint)