PDA

View Full Version : Sound Files with Mac Excel Solution



mikerickson
10-27-2008, 02:26 AM
Playing sound files from Mac Excel is challanging. All routines I've seen for playing sound files rely on Windows API functions, that aren't on a Mac.

So I put together this workbook that allows the user to select a sound file and have it played.

Its been tested on the sound files included with Office, the sounds that come with OS X and the iTunes library.

(It took me a while to find where stuff was stashed, here are some file paths
Applications > MicroSoftOffice 2004 > Office > Sounds > many
MacintoshHD > System > Library > Sounds > several
merickson > Music > iTunes > iTunesMusic > artist files)

It works by having Excel write AppleScripts as strings and use the VBA function, MacScript.

In this example workbook, the user chooses a file. it is opened with QuickTime Player which plays the selected file.

You should check that the file path Applications>QuickTime Player.app matches your situation. If not, the function scriptOpenFile needs to be modified.

When you open the file, press the button, which calls Main.

DecimalTurn
05-26-2023, 08:38 PM
I know this has been a while, but I can't find the example workbook metionned in the previous post. Is it possible that it was removed or something?

Aussiebear
05-26-2023, 09:18 PM
Unfortunately during an upgrade in the software almost all workbooks were removed, hence some of the threads will not make any sense at all.

DecimalTurn
05-27-2023, 08:50 PM
Thanks Aussiebear, I figured, but I still thought I should ask just in case.