How to Play a .AVI Video File in Full Screen in Word

ID: Q146901

The information in this article applies to:

SUMMARY

This article provides a sample WordBasic macro that plays an AVI file before it processes the next line of code.

NOTE: Your computer must be able to play AVI files for this macro to work.

Using Microsoft Windows 95 and Word 7.0

Declare Function mciSendStringA Lib "winmm"  (lpstrCommand$,
lpstrReturnString$, wReturnLength As Long, hWndCallback As Long) As Long

Sub MAIN
   cmdStr$ = "play c:\snwboard.avi fullscreen"
   mciSendStringA(cmdStr$, "", 0, 0)
End Sub

Using Microsoft Windows version 3.1

Declare Function mciSendString Lib "mmsystem.dll"  (lpstrCommand$,
lpstrReturnString$, wReturnLength As Integer, hWndCallback As Integer) As Integer

Sub MAIN
   cmdStr$ = "play c:\snwboard.avi fullscreen"
   mciSendString(cmdStr$, "", 0, 0)
End Sub

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

For additional information, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q104123
   TITLE     : VB 3: How to Play an .AVI Video File in Full Screen

   ARTICLE-ID: Q89316
   TITLE     : Word: How to Play a .WAV Sound File from Word for Windows

KBCategory: kbusage KBSubcategory: kbmacro Additional query words: 7.0 6.0 6.0a 6.0c winword ntword word95 word7 audio-visual audio visual movie
Keywords          : kbmacro
Version           : 6.0 6.0a 6.0c 7.0
Platform          : WINDOWS

Last Reviewed: January 20, 1999