Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Ishmael Goldstein Ishmael Goldstein is offline
external usenet poster
 
Posts: 1
Default Playing music in a Word Document

I am new to word and after reading through some of the posts here I realize
most of the MVPs don't have Word 2000 installed anymore but maybe someone can
still help me out.
My current supervisor has assigned me a task to create for him a word
document with text, pictures and music playing upon opening the file. The
latest version of office installed on our work PCs is 2000 and I do not have
any version on my home PC. I have managed to create everything except the
song he wants to play and finally exhaused all my resources. I did manage to
go to the toolbar, Insert; Objects; create from file, and inserted the sound
file (wav format) into my document. But that's as far as my knowledge goes
and I don't know how to make it play when you open the word document. I know
it's in there somewhere because when I click on edit the drop down box has a
sound recorder document object there but going through those options has not
helped me out and I'm stumped. Is this even possible? My employer seems to
be convinced it is and wont take 'I have no idea' for an answer. My job may
be on the line.......can anyone help me with this?
Thank you,
--
Ishy_G
  #2   Report Post  
Posted to microsoft.public.word.newusers
ChrisM ChrisM is offline
external usenet poster
 
Posts: 80
Default Playing music in a Word Document

In message ,
Ishmael Goldstein Proclaimed
from the tallest tower:

I am new to word and after reading through some of the posts here I
realize most of the MVPs don't have Word 2000 installed anymore but
maybe someone can still help me out.
My current supervisor has assigned me a task to create for him a word
document with text, pictures and music playing upon opening the file.
The latest version of office installed on our work PCs is 2000 and I
do not have any version on my home PC. I have managed to create
everything except the song he wants to play and finally exhaused all
my resources. I did manage to go to the toolbar, Insert; Objects;
create from file, and inserted the sound file (wav format) into my
document. But that's as far as my knowledge goes and I don't know how
to make it play when you open the word document. I know it's in there
somewhere because when I click on edit the drop down box has a sound
recorder document object there but going through those options has
not helped me out and I'm stumped. Is this even possible? My
employer seems to be convinced it is and wont take 'I have no idea'
for an answer. My job may be on the line.......can anyone help me
with this?
Thank you,


You'd probably need to write an 'On-Open-Document' macro to play the music
file when you open the document. Not exactly sure how you'd do that, but
that is where I think you should start looking...

--
Regards,
Chris.
(Remove Elvis's shoes to email me)


  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Playing music in a Word Document

I think your job will be safe

See http://www.vbaexpress.com/kb/getarticle.php?kb_id=461

The macro there is similar to the version of it reproduced below, however
this one will play the WAV file indicated on opening the document

Option Explicit

'API Class to take care of playing the file
Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Sub AutoOpen()
'Call Api to play LoadIt.wav which is in the same folder as
'the active document!
Call sndPlaySound32("C:\Path\Soundfile.WAV", 0)
End Sub

read the linked article which explains how to install the macro.

The macro should ideally be saved in the template of the document (not
normal.dot) - as there are macro security issues involved in saving it in
the document itself, which will could mean that the macro will not run.
Users will of course have to have the template installed in order to produce
the required results.

The sound file must be in WAV format - I tested it with a music track ripped
from a CD and it worked fine. You can either use the full path to the WAV
file as here, or put it in the same folder as the document and use the path
shown in the web page.


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org







Ishmael Goldstein wrote:
I am new to word and after reading through some of the posts here I
realize most of the MVPs don't have Word 2000 installed anymore but
maybe someone can still help me out.
My current supervisor has assigned me a task to create for him a word
document with text, pictures and music playing upon opening the file.
The latest version of office installed on our work PCs is 2000 and I
do not have any version on my home PC. I have managed to create
everything except the song he wants to play and finally exhausted all
my resources. I did manage to go to the toolbar, Insert; Objects;
create from file, and inserted the sound file (wav format) into my
document. But that's as far as my knowledge goes and I don't know how
to make it play when you open the word document. I know it's in there
somewhere because when I click on edit the drop down box has a sound
recorder document object there but going through those options has
not helped me out and I'm stumped. Is this even possible? My
employer seems to be convinced it is and wont take 'I have no idea'
for an answer. My job may be on the line.......can anyone help me
with this?
Thank you,



  #4   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Playing music in a Word Document

Plan B - if you are creating this as a separate auto-playing
document/template, then change the line

Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

to

Private Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Note that the document will not be available for editing until the sound
clip has finished.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Graham Mayor wrote:
I think your job will be safe

See http://www.vbaexpress.com/kb/getarticle.php?kb_id=461

The macro there is similar to the version of it reproduced below,
however this one will play the WAV file indicated on opening the
document
Option Explicit

'API Class to take care of playing the file
Public Declare Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName As String, _
ByVal uFlags As Long) As Long

Sub AutoOpen()
'Call Api to play LoadIt.wav which is in the same folder as
'the active document!
Call sndPlaySound32("C:\Path\Soundfile.WAV", 0)
End Sub

read the linked article which explains how to install the macro.

The macro should ideally be saved in the template of the document (not
normal.dot) - as there are macro security issues involved in saving
it in the document itself, which will could mean that the macro will
not run. Users will of course have to have the template installed in
order to produce the required results.

The sound file must be in WAV format - I tested it with a music track
ripped from a CD and it worked fine. You can either use the full path
to the WAV file as here, or put it in the same folder as the document
and use the path shown in the web page.



Ishmael Goldstein wrote:
I am new to word and after reading through some of the posts here I
realize most of the MVPs don't have Word 2000 installed anymore but
maybe someone can still help me out.
My current supervisor has assigned me a task to create for him a word
document with text, pictures and music playing upon opening the file.
The latest version of office installed on our work PCs is 2000 and I
do not have any version on my home PC. I have managed to create
everything except the song he wants to play and finally exhausted all
my resources. I did manage to go to the toolbar, Insert; Objects;
create from file, and inserted the sound file (wav format) into my
document. But that's as far as my knowledge goes and I don't know how
to make it play when you open the word document. I know it's in there
somewhere because when I click on edit the drop down box has a sound
recorder document object there but going through those options has
not helped me out and I'm stumped. Is this even possible? My
employer seems to be convinced it is and wont take 'I have no idea'
for an answer. My job may be on the line.......can anyone help me
with this?
Thank you,



  #5   Report Post  
Jeffeuilar Jeffeuilar is offline
Junior Member
 
Posts: 6
Default

While it's not possible to directly play music within a Word document, you can insert audio files as objects. These files won't play automatically, but clicking on them will open your default media player to play the music. This can be a handy way to include sound effects, narration, or background music in your New York Jazz Workshop document, but be aware that it increases the file size and recipients might need compatible media players to access the audio.


  #6   Report Post  
Jeffeuilar Jeffeuilar is offline
Junior Member
 
Posts: 6
Default

I haven't come across a way to directly play music within a Word Document. While you can insert audio files, they won't play automatically. It might be better to consider linking to an external music source or using a presentation Academized review at MSN program with audio capabilities.

Last edited by Jeffeuilar : April 5th 24 at 08:39 PM
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word should catalog misspelled words to study. rndthought Microsoft Word Help 39 May 21st 23 02:47 AM
Reveal codes in a word document FUN101 Microsoft Word Help 4 May 16th 23 08:47 PM
take yet another lesson from wordperfect "reveal codes" wordperfect is superior Microsoft Word Help 5 May 11th 09 07:58 PM
I am having difficulty with deleting headers and footers LHD New Users 5 July 24th 06 01:44 AM
How to reformat a complete document. wanda Microsoft Word Help 16 February 11th 06 11:43 PM


All times are GMT +1. The time now is 11:23 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"