Solved

Embed several Windows Media Player controls in one Word doc

Posted on 2009-07-08
1
625 Views
Last Modified: 2012-05-07
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

0
Comment
Question by:penelope112358
1 Comment
 

Accepted Solution

by:
penelope112358 earned 0 total points
Comment Utility
"WindowsMediaPlayer2" will be the default name of the next Media Player Control. It can be changed in the controls properties.  

Penelope
Private Sub Document_Open()

 

Dim strName As String

 

strName = "C:\Delme\clock.avi"  '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", True     'make it loop
 
 
 
 
 

strName = "C:\Delme\clock.avi"  'your file name

 

WindowsMediaPlayer2.windowlessVideo = True

WindowsMediaPlayer2.settings.autoStart = False   'stop it from automatically starting on load

 

WindowsMediaPlayer2.URL = strName   'add the path to your file

WindowsMediaPlayer2.settings.volume = 100      'here you can change initial volume

WindowsMediaPlayer2.settings.setMode "loop", True     'make it loop

 
 
 

 

End Sub

Open in new window

0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

It's here again; Microsoft is launching a new version of Internet Explorer: Internet Explorer 9, with noticeable changes on its interface, functions and new tools. As they say on its promotional video: "It's time to play, on a more beautiful web", f…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now