Solved

How to run a Powerpoint presentation within Powerpoint

Posted on 2014-02-05
3
677 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

My experience with Windows 10 over a one year period and suggestions for smooth operation
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

805 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