A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

adding sound with vba for blind friend



 
 
Thread Tools Display Modes
  #1  
Old February 8th, 2005, 04:34 AM
Jay Edgar
external usenet poster
 
Posts: n/a
Default 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  
Old February 8th, 2005, 12:35 PM
Shyam Pillai
external usenet poster
 
Posts: n/a
Default

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  
Old February 8th, 2005, 02:31 PM
Jay Edgar
external usenet poster
 
Posts: n/a
Default

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  
Old February 8th, 2005, 04:19 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default

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  
Old February 9th, 2005, 05:57 AM
Jay Edgar
external usenet poster
 
Posts: n/a
Default

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  
Old February 9th, 2005, 06:12 AM
Jay Edgar
external usenet poster
 
Posts: n/a
Default

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  
Old February 20th, 2005, 04:00 PM
brian@nothere_reillyand.com
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.