Quote from: Sidewinder on March 07, 2008, 02:52:52 PM
In my previous post I recommended VB Script, but further research shows that VBScript might not be a good solution.
Can you expand on this??
My first thought was to setup an Outlook rule (Tools-->Rules Wizard) so when a email arrived with say,
slideshow in the subject line it would fire off an external script which would save the attachment and run the slideshow. This creates a timing problem however...what happens if an email arrives and a slideshow is in progress? Now you've got multiple copies of an external script conflicting with each other.
I have also been looking at this option. Something along the lines of:
outlook, closing powerpoint if open, saving attachment and starting vbs script.
vbs script, starting slideshow and loop until powerpoint closes (by outlook)
what do you reckon???
I reckon this would be too complicated plus the fact that VBA is not multithreaded, you can either be looping or showing the slideshow but the not both. If you notice in the Powerpoint script that was posted, there is no need to open and close applications. You are dealing with COM objects here. The COM object will do all the pesky detail work.
I would think something a little simpler might work. Write a Application_NewMail() event handler in Outlook. Also create a ShowSlideshow() subroutine in Outlook. Have the event handler call the SlideShow routine if a new email arrives.
The events described above will have Outlook waiting for mail....no mail, no slideshow! If your requirements are to continually show the old slideshow until a new one arrives, you can loop the SlideShow routine with a DoEvents at the bottom.
There might be other ways, but outside of Outlook you lose the NewMail event. You could possibly keep track of the email count in the inbox and if the count increases then you know a new slideshow has arrived.
Just out of curiousity: how long are these slideshows and how often do new ones arrive?