0

Is there a way to insert an audio file in VBA code and how would I write the loop so that it advances the slide right after the audio file finishes playing until the slideshow is done? (i.e "Advancing to next slide in 3....2....1...." [changes to next slide])

For example:

Sub AutoSlide()
while '(slideshownotover)
      'wait 8 seconds
      'play given audio wav file
      ActivePresentation.SlideShowWindow.View.Next 'do this after audio finishes
End Sub
jezhuz
  • 41
  • 1
  • 6
  • Stack Overflow is no Code-writing Service! Please try to do as much as you can by youself and if you face some problems ask for those. – Tim Schmidt Jul 24 '17 at 15:29
  • Even without some VBA code, you can do this: 1. In the slide transition menu, make every slide advance to next slide in 0 sec ( or shorter than the length of the audio file). 2. insert audio files in each slide and make them play automatically. You can do this with VBA too. – konahn Nov 11 '21 at 13:04

1 Answers1

1

This isn't enough information to really understand the scenario. However, one possible approach would be:

  1. On a trigger (such as pressing a button or reaching a certain slide), have a VBA macro load an audio file.
  2. Read the length of the audio file (in VBA).
  3. Play the file and wait the required amount of time (the length of the audio file) to progress to the next slide.
Daniel
  • 1,695
  • 15
  • 33