PUB97: How to Add Background Sound to Your Web Page (156154)



The information in this article applies to:

  • Microsoft Publisher 97, when used with:
    • the operating system: Microsoft Windows NT 4.0

This article was previously published under Q156154

SUMMARY

If you want a sound (.wav) or MIDI (.mid) file to play automatically when you view your Web page, you can manually add a <BGSOUND> tag to the HTML code created by Publisher.

WARNING: ANY USE OF THE HTML CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this HTML code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

MORE INFORMATION

The steps below illustrate one method of adding a background sound to your Web Page.

These directions assume that you have already used the Publish Web Site to Folder command on Publisher's File menu. They also assume that you have not used the Web Site Properties command (also on the File menu) to change the default Web Site naming convention.
  1. Copy the .wav or .mid file you wish to use as a background sound to the same folder to which you published your Web Site. For this example, assume the file is named Bgsound.wav.
  2. Run Notepad.
  3. On the File menu, click Open. Change to your Web site folder.
  4. On the Open Files of Type list, click All Files .
  5. Click the file called Index.html and click Open.
  6. Find the line near the beginning of the file that is similar to the following:
          <body bgcolor="#ffffff"  link="#0000ff" vlink="#ff0000"
          text="#000000">
    						
    NOTE: The values for bgcolor, link, vlink, and text may be different for your Web Page.
  7. Insert a new line immediately below this line. This new line should contain the text:
          <BGSOUND SRC="bgsound.wav">
    						
    If you wish the sound to repeat several times, you can add a LOOP attribute to this command. For example:
          <BGSOUND SRC="bgsound.wav" LOOP=5>
    						
    plays Bgsound.wav five times in a row. Similarly,
          <BGSOUND SRC="bgsound.wav" LOOP=INFINITE>
    						
    plays Bgsound.wav over and over again until you go to a different Web Page.
  8. On the File menu, click Save.
If you wish to make more drastic changes to your Web Site, you may wish to open your Web Site in an HTML authoring/editing program, such as Microsoft FrontPage.

Modification Type:MajorLast Reviewed:10/8/2003
Keywords:kbhowto kbinterop kbusage KB156154