
How to play MP3 file when document opens
Quote:
> What macro command would I write to start an MP3 file when
> a document opens?
If you want the Mp3-file to be embedded in your document, you should
insert it as an media object, and then make a macro named AutoOpen. In
the macro, type:
ActiveDocument.InlineShapes(1).Activate
This assumes the Mp3-file is the only object in your file, though. If
you have other objects, try to find out which number your mp3-file is,
and replace 1 with that number.
If you want to play an Mp3-file which is located somewhere else, you
can simply do this by opening it in your favourite mp3-player with the
following command:
Shell "C:\Program Files\Windows Media Player\mplayer2.exe
C:\mp3\MyMp3.mp3"
This will open media player and play your file.
Magne