Link to home
Start Free TrialLog in
Avatar of penelope112358
penelope112358Flag for Switzerland

asked on

Embed several Windows Media Player controls in one Word doc

How must I modify the attached code to make it work for 2 embedded players? I think the players must be assigned names to which the code can refer but I don't know if "WindowsMediaPlayer1" may be renamed... Perhaps with a tag or a label?

Penelope
Private Sub Document_Open()
 
Dim strName As String
 
strName = strPATHNAME & "all.wmv"  'your file name
 
WindowsMediaPlayer1.windowlessVideo = True
WindowsMediaPlayer1.settings.autoStart = False   'stop it from automatically starting on load
 
WindowsMediaPlayer1.URL = strName   'add the path to your file
WindowsMediaPlayer1.settings.volume = 100      'here you can change initial volume
WindowsMediaPlayer1.settings.setMode "loop", False     'stop it from looping
 
End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of penelope112358
penelope112358
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial