If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
adding sound with vba for blind friend
Hi all:
A friend of mine is developing his career as a public speaker (read: he has no money). I'm developing code that will read the slide number every time he moves to a new slide. I'm a VBA wiz with Access, yet completely lost with PPT. I found some code that will display a message box with each slide change (Sub Auto_NextSlide). I need to play a .wav, .mp3, etc., instead. Can anyone tell me the command? Your help is greatly appreciated. Regards, Jay |
#2
|
|||
|
|||
Jay,
Two methods to play sound files (*.WAV) files synchronously/asynchronously http://skp.mvps.org/ppt00040.htm#3 -- Regards, Shyam Pillai Toolbox: http://skp.mvps.org/toolbox "Jay Edgar" wrote in message ... Hi all: A friend of mine is developing his career as a public speaker (read: he has no money). I'm developing code that will read the slide number every time he moves to a new slide. I'm a VBA wiz with Access, yet completely lost with PPT. I found some code that will display a message box with each slide change (Sub Auto_NextSlide). I need to play a .wav, .mp3, etc., instead. Can anyone tell me the command? Your help is greatly appreciated. Regards, Jay |
#3
|
|||
|
|||
Thank you, Shyam. I looked through your site last night, and appreciate your
help. I will give this a shot tonight or tomorrow. Regards, Jay "Shyam Pillai" wrote in message ... Jay, Two methods to play sound files (*.WAV) files synchronously/asynchronously http://skp.mvps.org/ppt00040.htm#3 -- Regards, Shyam Pillai Toolbox: http://skp.mvps.org/toolbox |
#4
|
|||
|
|||
In article , Jay Edgar wrote:
Hi all: A friend of mine is developing his career as a public speaker (read: he has no money). I'm developing code that will read the slide number every time he moves to a new slide. I'm a VBA wiz with Access, yet completely lost with PPT. I found some code that will display a message box with each slide change (Sub Auto_NextSlide). I need to play a .wav, .mp3, etc., instead. Can anyone tell me the command? In addition to Shyam's suggestion, you can go the non-vba route and apply a sound to each slide's Transition (Slide Show, Transition from the main menu) These are always embedded, so there are no linking issues; the only hitch is that they must be WAVs - can't use MP3s. You could create a series of wavs like: 1.wav that contains the recorded word "one" and so on. Then in one sweep through the program, you could set the transition sound for each slide to cstr(SlideIndex) & ".WAV" ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#5
|
|||
|
|||
Shyam:
I'm a bit flummoxed, so will ask your help once again. I used the code on the page to which you referred me. I discovered it didn't work with mp3s (just thought I'd try), and got it to work for a wav file. I placed the code to play the wav in the next slide event. It worked great. Next I added a for loop like: for i = 1 to Index [code to play the sound] next i thinking it would play the tone as many times as the number of the slide. It didn't work. When I set to code back to what worked, it no longer worked. I then deleted both the PPT and PPA, and brought out the original versions from the zip file. No go. I removed and readded the add-in. No go. I restarted my computer. No go. The security is low security and both 'trust' checkboxes are turned on. Any clue how I fix it? Thank you for your help. Regards, Jay P.S. Computers drive me nuts sometimes. Good thing I always win in the end... |
#6
|
|||
|
|||
I did some more experimentation. I put debug.print statements in each of the
events (starting, closing, opening, etc.). None of the events is kicked off when I open or run a presentation. In the code window, if I have the cursor in any event and hit F5, it runs the event (displays the message box and does the debug.print) EXCEPT the next slide event. when I have the cursor in this event and hit F5, it brings up a dialog box with all events and asks which one I want to run. The next slide event is not listed, as though the code can't see it. huh? The modules debug just fine. I have never seen anything like this in all my years of Access VBA work. The only thing I can think is to dump Office and reload, which I'd REALLY rather not do. I will also try this on my computer at work. Again, any help is appreciated. Regards, Jay |
#7
|
|||
|
|||
Jay,
Events work differently in PPT than they do in Access or Excel. See this article for a much more detailed explanation of how to get events working. http://www.rdpslides.com/pptfaq/FAQ00004.htm Brian Reilly, PowerPoint MVP On Wed, 9 Feb 2005 00:12:29 -0600, "Jay Edgar" wrote: I did some more experimentation. I put debug.print statements in each of the events (starting, closing, opening, etc.). None of the events is kicked off when I open or run a presentation. In the code window, if I have the cursor in any event and hit F5, it runs the event (displays the message box and does the debug.print) EXCEPT the next slide event. when I have the cursor in this event and hit F5, it brings up a dialog box with all events and asks which one I want to run. The next slide event is not listed, as though the code can't see it. huh? The modules debug just fine. I have never seen anything like this in all my years of Access VBA work. The only thing I can think is to dump Office and reload, which I'd REALLY rather not do. I will also try this on my computer at work. Again, any help is appreciated. Regards, Jay |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding a sound clip to run through presentation | Cougz1 | Powerpoint | 2 | January 19th, 2005 03:52 AM |
Adding sound to email | Chris | Installation & Setup | 0 | December 9th, 2004 02:39 AM |
Sound Library Questions | Al Stearns | Powerpoint | 2 | May 25th, 2004 02:47 AM |