I think youre both right Mitchys and Right_Click about the behavior of this OLE object.
I didn't notice before, but the type of "embed" seems to affect the behavior. For the object to play in background, it must be inserted as a "Sound Recorder Document". If it's inserted as a "Package", then the registered application is opened to handle the document... in my case winamp.
if you check the formula contents of the object, they read the following when the sound object behaves normally (in background):
=EMBED("Sound Recorder Document","")
However, if it reads the following, then the registered app handles the file:
=EMBED("Package","")
When adding an object, the create from file should be able to detect what kind of file it is and assign the appropiate package type. For example, when adding a wave file, it should automatically make it a "Sound Recorder Document".
I think what caused my issue is that for some reason it didn't detect the wave properly. Perhaps it was a raw instead of pcm, or a non compatible sampling rate with window's sound recorder. Unfortunately I dont have the wave any longer, but I bet that was the issue, and excel added it as a "package".
thanks to both of your for helping track down this behavior. I'm sure others will/have encountered it too.
On a different but related note, it looks like this method is only capable of playing a sound synchronously. That is, the macro code pauses only to resume after the sound finishes. Not sure if there is a way to play a sound asynchronously. maybe there is a way to fork it (?)