Solved

How to run a Powerpoint presentation within Powerpoint

Posted on 2014-02-05
3
676 Views
Last Modified: 2014-03-31
Hi,

My requirement is to have a Powerpoint presentation run in jhe background of a work canteen.  I want to  put files (Powerpoints and image files) in a particular folder and have Powerpoint loop thru and open each file, import and display them in a looping slideshow.

Everynow and again different files will be placed in the folder and I want to dynamically insert them into my looping presentation.

I'd expect this to be done through VBA coding.  I am experienced in Excel & Access with VBA coding but not with Powerpoint.

Has anyone done anything similar in the past?

Thanks
0
Comment
Question by:adb11a
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39838079
Hi,

Pls try this youhave to build the loop to repeat the whole procedure

Function RunPresentation(strFolderAndFile As String)

Set oPres = Application.Presentations.Open(strFolderAndFile)

oPres.Slides.Range.SlideShowTransition.AdvanceOnTime = True
oPres.SlideShowSettings.AdvanceMode = ppAdvanceOnTime
oPres.SlideShowSettings.ShowType = ppShowTypeKiosk

oPres.SlideShowSettings.StartingSlide = 1
oPres.SlideShowSettings.EndingSlide = oPres.Slides.Count

Set objSlideShow = oPres.SlideShowSettings.Run.View

Do Until objSlideShow.State = ppSlideShowDone
    If Err <> 0 Then
        Exit Do
    End If
Loop
oPres.Saved = True
oPres.Close


End Function

Sub LoopThrougFiles()
    MyFile = Dir(CurDir() & "\" & "*.ppt*")
    Do While MyFile <> ""
        theFile = Dir()
        RunPresentation (curDir() & "\" & theFile)
    Loop
End Sub

Open in new window

0
 

Author Comment

by:adb11a
ID: 39848871
Thanks Rgonzo1971,

I was able to use this method to get me started. Well done!
0
 

Author Comment

by:adb11a
ID: 39967866
I've requested that this question be closed as follows:

Accepted answer: 0 points for adb11a's comment #a39848871

for the following reason:

Got me started...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now