Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.newusers
|
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Word should catalog misspelled words to study. | Microsoft Word Help | |||
Reveal codes in a word document | Microsoft Word Help | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
I am having difficulty with deleting headers and footers | New Users | |||
How to reformat a complete document. | Microsoft Word Help |