VBA - WindowsMediaPlayer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to use VBA to get the windows media player (I drew it using the
VBA controls) to play a mpg file, either automatically when the slide
advances, or when a user clicks a "Play" button.

Does anyone know what code I should use to get the WindowsMediaPlayer to
find the mpg file and play it? This is eventually going to go on a CD for
users. I want it to be very easy for them -- like some sort of installation
script that launches the presentation and will play the wpg file.

Thanks so much for any help!
 
Not an easy thing to do at all. First you must consider that your receiving
client may not have as new a version of WMP as you did when you sent it to
him. Second they may or may not have the codec's installed to play your
video file. And finally WMP uses hard coded paths to the media file and
unless you can make certain the receiving PC set's your presentation into
the same exact path it will fail.

This isn't to say it can't be done, but it will require a considerable
amount of coding to do it. It is MUCH simpler to convert the media into
something PPT can understand and deal with and then insert it as you
normally would.

Austin Myers
MS PowerPoint MVP Team
 
Thanks so much for your reply, Austin.

I thought an mpg file was something PPT could understand. Is there
something else I should convert it to instead? It was originally a .rm.

I inserted the MPG file into PPT originally by Insert > Movies and Sounds >
Movie from File. It worked fine but only if the mpg file stays in that same
folder. If the mpg file gets moved, it doesn't know where to look for it.
So I was trying to do something with the VBA code that would play the video
without having to worry about that file getting moved. Is there a way to
embed it right in the ppt file so that it doesn't have to look somewhere for
it?
 
I thought an mpg file was something PPT could understand.

It does.
Is there something else I should convert it to instead? It was originally
a .rm.

No reason to if it works/plays
I inserted the MPG file into PPT originally by Insert > Movies and Sounds

Movie from File. It worked fine but only if the mpg file stays in that same
folder. If the mpg file gets moved, it doesn't know where to look for it.


Ah, that's an entirely different problem. Move the file to the same folder
you have the presentaiton saved in, THEN insert it on your slide. Once
completed make certain to keep them together as you move or copy them and
all should work as expected.

Austin Myers
MS PowerPoint MVP team
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top