Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Running mp3 files from Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
athena - 04 Oct 2005 01:11 GMT
Hi,

   How can I run mp3 files from a word document, without displaying Windows
Media Player or any player and also not showing the warning message about
viruses etc? Any ideas?

 Thank you.

Cem
Jay Freedman - 04 Oct 2005 04:52 GMT
>Hi,
>
[quoted text clipped - 5 lines]
>
>Cem

Some smart person may waltz in with a solution, but I don't think it
can be done for the general case. I think the absolute minimum would
be a macro that uses the Shell command.

To run any macro without an antivirus warning, you have to meet these
conditions:

- If the macro is in a document, the code is signed with a digital
certificate. The user will have to accept the certificate the first
time the macro runs.

- If the macro is in a template, the template must be installed in a
"trusted location" -- the User Templates or Workgroup Templates
folder. The security level must be set no higher than Medium -- which
is something you as a developer have no control over.

If you can get past these hurdles, you can probably launch the default
player without making it visible.

Personally, if I opened a Word document and the thing started playing
music at me, I'd hit the Delete key so fast it would make your head
spin. I usually keep the speakers turned off anyway.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Al Borges - 14 Oct 2005 11:04 GMT
Hi Jay:

Waltzing in... (OLE music please!!!).

Actually, it's easy. I had an OLE sound clip in an Access program that I
copied then pasted right onto my Word document. I clicked on it, and it
played the sound (clapping) without actually bringing up the Windows Media
Player. Access mentions that it uses the "Microsoft Sound Recorder Server".

Easy, huh? I'm sure that if one sets up an application object in Word, you
could programmatically activate it with code similar to this code that I
used in Access:

Dim ctr As Control
Set ctr = Me!CLAPPING
ctr.Action = acOLEActivate

You can download the simple document with the embedded OLE control ("Doc
with OLE Sound Control") from http://briefcase.yahoo.com/alborgmd.

Regards,
Al

(check out my free MS Word EMR Project, downloadable at
http://www.emrupdate.com/freestuff/alborgesmd.aspx)

>>Hi,
>>
[quoted text clipped - 34 lines]
> Jay Freedman
> Microsoft Word MVP        FAQ: http://word.mvps.org 
Jean-Guy Marcil - 14 Oct 2005 15:33 GMT
Al Borges was telling us:
Al Borges nous racontait que :

> Hi Jay:
>
[quoted text clipped - 16 lines]
> ("Doc with OLE Sound Control") from
> http://briefcase.yahoo.com/alborgmd.

That seems to be a WAV sound embedded in a Word document. The OP asked about
an MP3 file...
You can embed an MP3 file in a Word document, but playing it will pop up a
virus warning and some kind of MP3 player (whatever the MP3 default player
is on the system Windows Media, WinAmp, etc.), no?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Al Borges - 15 Oct 2005 10:30 GMT
Hi Jean:

OLE music please!!! Just leave out the mayo and the player...

Yeah, weird. The wav files also bring up a sound program s.a. Realplayer if
you copy and paste them directly onto your Word project. I tried to check
settings inside Windows, then inside MS Word, etc. Nothing. Almost gave
up... but I think I figured it out!

You have to do this to keep a program from launching:

1) Go to the toolbar, then select Insert > Object, then select "wave sound".
Now click "OK". You'll see the little horn icon, which means no popup will
occur.
2) Now right click on this object then select Sound Recorder Document Object
> Edit. Now click on Edit > Insert File. Choose your *.wav file. Now exit
out of this mini-player (don't worry- you won't see this again).
3) Click on the icon, and enjoy your sound, sans Realplayer or Windows popup
player.

The new test document with both an embedded "test.wav" as well as an object
with "test.wav" can be downloaded from http://briefcase.yahoo.com/alborgmd.

Regards,
Al

> Al Borges was telling us:
> Al Borges nous racontait que :
[quoted text clipped - 25 lines]
> virus warning and some kind of MP3 player (whatever the MP3 default player
> is on the system Windows Media, WinAmp, etc.), no?
Jean-Guy Marcil - 15 Oct 2005 15:15 GMT
Al Borges was telling us:
Al Borges nous racontait que :

> Hi Jean:
>
[quoted text clipped - 15 lines]
>> exit
> out of this mini-player (don't worry- you won't see this again).

Sorry to be a pest, but...
Again, the OP was asking about an MP3 file, not a WAV file.
You can play a WAV file directly in Word without any third party player
showing up on screen. But can you do the same with an MP3 file?
I know you can convert an MP3 into a WAV file, but that means the final file
size will be about 6 times larger.... And I am not sure that this is
something the OP can/want to do.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org 

Al Borges - 16 Oct 2005 01:08 GMT
Hi Jean:

Word can't play MP3's directly, a limitation seen in most other Microsoft
products. In fact, if we were discussing Outlook, there is an Add-in that
specifically addresses that problem within Outlook that opens up mp3
playback. It's for download in numerous places (just look for "Outlook mp3
Player")... At his site, the author discusses the Microsoft software
limitation to playing wav files, and how his software addresses this.

He's right- I tried looking for some similar Add-in from CNET.com downloads,
and nothing is available. I checked MSDN and nothing about mp3 playing in
Office or Word is even discussed. I guess it'll have to be wav playing...
size and all.

Regards,
Al

> Sorry to be a pest, but...
> Again, the OP was asking about an MP3 file, not a WAV file.
[quoted text clipped - 3 lines]
> size will be about 6 times larger.... And I am not sure that this is
> something the OP can/want to do.

> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site: http://www.word.mvps.org

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.