Solved

How to run a Powerpoint presentation within Powerpoint

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

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
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
Comment Utility
Thanks Rgonzo1971,

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

Author Comment

by:adb11a
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

This collection of functions covers all the normal rounding methods of just about any numeric value.
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.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

763 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

6 Experts available now in Live!

Get 1:1 Help Now