Microsoft Outlook Script modification needed

Nicotine1
Nicotine1 used Ask the Experts™
on
I would like modification to the script in the following link:

http://www.experts-exchange.com/Software/Internet_Email/Q_28343780.html#a39906510

The code should  :


Show a powerpoint slide in read only mode rather than a pop up box.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010

Commented:
Nick,

Will the slideshow be a single slide or multiple slides?  Do you want it to show fullscreen or in a window?

Author

Commented:
a single slide on a full screen please
Top Expert 2010
Commented:
Nick,

Add this code to the bottom of the code you have in part #2 of the previous question.

Sub ShowPowerPointSlide(strPathToPPTFile As String)
    Const msoTrue = -1
    Const msoFalse = 0
    Const ppShowTypeKiosk = 3
    Dim pptApp As Object, pptPre As Object
    Set pptApp = CreateObject("PowerPoint.Application")
    Set pptPre = pptApp.Presentations.Open(strPathToPPTFile, msoTrue, msoFalse, msoFalse)
    With pptPre.SlideShowSettings
        .ShowType = ppShowTypeKiosk
        .Run
    End With
    pptPre.Saved = msoTrue
    Set pptPre = Nothing
    Set pptApp = Nothing
End Sub

Open in new window


Now, edit line #91 of the code in part #2, changing it from

MsgBox "You have not received a message from " & objTrack.Sender & " with a subject of """ & objTrack.Subject & """ in the last " & objTrack.Interval & " minutes.", vbInformation + vbOKOnly + vbApplicationModal, "Message Not Received"

Open in new window


to

'On the next line edit the path to and name of the PowerPoint file you want to show
ShowPowerPointSlide "C:\Showfile.pptx"

Open in new window


Instead of the message-box dialog you'll now get the slide in the PowerPoint file.  Pressing ESC will clear the slide from the screen.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Author

Commented:
h

Author

Commented:
I encounter the following error occassionally.pop up    debug
Top Expert 2010

Commented:
Do you have a rule that's moving items to another folder?  That's the most likely cause.

Author

Commented:
Yes there is, but it cannot be removed. Is there any work around?
Top Expert 2010

Commented:
There are two options.

1.  Convert the code to run from a rule.  You would create a rule that fires for all messages except those moved by the other rule.  The new rule would run the macro.

2.  Convert the other rule into code and add it to what I posted above.

The former is probably the better choice, but I'll leave it up to you to decide which way to go.

Author

Commented:
Seems like it Option 1 is the way to go.

I guess the new rule will have to be the very first rule in the mailbox, so it doesn't affect the other rules right?
Top Expert 2010

Commented:
Ok.  I'm going to make that change in the original question since it really has nothing to do with the present question.

Author

Commented:
Thanks Blue Devil Fan
Top Expert 2010

Commented:
You're welcome, sir!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial