I tried to insert the macro for playing sound in a word document. The
steps are very straight forward. When I try to test the script in the
editor I get a comple error that goes something like ..."Only
comments may appear after End-Sub, End-Function or End-Property".
What should I do to correct this error?
Here is what the script looks like in the editor;
Sub Sound()
Option Explicit
Private Declare Sub PlaySound Lib "winmm.dll" _
(ByVal lpszName As String, _
ByVal hModule As Long, _
ByVal dwFlags As Long)
Private Const SOUND_FILENAME = &H20000
Sub AutoOpen()
Dim sndFileName As String
Dim i As Long
'Note: Change the next line to point to your sound file.
sndFileName = "C:\Documents and Settings\Administrator\My Documents\My
Stuff\Chicago Bears\SuperBowlShuffle.mp3"
PlaySound sndFileName, 0&, SOUND_FILENAME
End Sub
Greg Maxey said:
I'm looking for a solution to this question if it's possible. If
that's not possible just say so, rather than some pissy comment.
I understand that you can 'embed' all sorts of sound file types
into a MS Word document. It would be very helpful if you can do
that with an MP3 file. If there is a way to do that, I would like
to know how.
Again, thanks in advance to anyone with some good information about
how to possibly do this!!
Oh heavens, I hope not.
--
JoAnn Paules
MVP Microsoft [Publisher]
~~~~~
How to ask a question
http://support.microsoft.com/KB/555375
Is it possible to create a Word Document that will have an MP3
sound file as
a background sound, that can be 'embedded' in the document so
that the document can be sent to multiple users?
Thanks in adavcne for any help!!- Hide quoted text -
- Show quoted text -
Not tested with MP3, but you might try something along the lines
shown here:
http://gregmaxey.mvps.org/Sound_On_Document_Open.htm