Microsoft KB Archive/100047: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 23: | Line 23: | ||
If your machine is capable of playing sounds, you can assign sounds to a Word for Windows command by modifying the macro for that command. | If your machine is capable of playing sounds, you can assign sounds to a Word for Windows command by modifying the macro for that command. | ||
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code | WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro 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 == | == MORE INFORMATION == | ||
Line 31: | Line 31: | ||
For example, change the EditPaste command as shown below to assign the JETS.WAV sound file to that command. This sample macro assumes that the JETS.WAV sound file is located in the Windows program directory (which is on drive C and is called WINDOWS). | For example, change the EditPaste command as shown below to assign the JETS.WAV sound file to that command. This sample macro assumes that the JETS.WAV sound file is located in the Windows program directory (which is on drive C and is called WINDOWS). | ||
<pre>Declare Function SndPlaySound Lib | <pre>Declare Function SndPlaySound Lib "MMSYSTEM"(File$, sFlag as Integer)\</pre> | ||
as Integer | as Integer | ||
<pre>Sub Main</pre> | <pre>Sub Main</pre> | ||
x = SndPlaySound( | x = SndPlaySound("c:\windows\jets.wav", 1) Super EditPaste | ||
<pre>End Sub | <pre>End Sub | ||
</pre> | </pre> | ||
Line 41: | Line 41: | ||
</pre> | </pre> | ||
Reference(s): | Reference(s): | ||
"User's Guide," version 2.0, pages 784-786 | |||
|} | |} | ||
Line 56: | Line 56: | ||
</span><br /> | </span><br /> | ||
<br /> | <br /> | ||
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED | THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.</blockquote> | ||
|} | |} | ||
Last reviewed: July 30, 1997<br /> | Last reviewed: July 30, 1997<br /> | ||
© 1998 Microsoft Corporation. All rights reserved. [[../cpyright|Terms of Use.]]<br /> | © 1998 Microsoft Corporation. All rights reserved. [[../cpyright|Terms of Use.]]<br /> |
Latest revision as of 11:53, 19 July 2020
How to Assign Sounds to Word for Windows CommandsLast reviewed: July 30, 1997 |
The information in this article applies to:
SUMMARYIf your machine is capable of playing sounds, you can assign sounds to a Word for Windows command by modifying the macro for that command. WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro 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 INFORMATIONTo assign a .WAV sound file to a Word command, add the Windows API SndPlaySound function call and the name of the .WAV file to the macro for that command. When you execute the command, Word plays the .WAV file. For example, change the EditPaste command as shown below to assign the JETS.WAV sound file to that command. This sample macro assumes that the JETS.WAV sound file is located in the Windows program directory (which is on drive C and is called WINDOWS). Declare Function SndPlaySound Lib "MMSYSTEM"(File$, sFlag as Integer)\ as Integer Sub Main x = SndPlaySound("c:\windows\jets.wav", 1) Super EditPaste End Sub For more information on playing .WAV sound files from Word, query on the following words in the Microsoft Knowledge Base: WAV and play and sound and winword Reference(s): "User's Guide," version 2.0, pages 784-786 |
KBCategory: kbmacro kbhowto |
Last reviewed: July 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.