Solved

Embed several Windows Media Player controls in one Word doc

Posted on 2009-07-08
1
634 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
ID: 24802520
"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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Sudden performance loss on a Vista system. 14 153
IE 11 + long running scripts 3 74
Chrome SSRS print Functionality 1 60
Browser Chrome downloads colored link 5 48
How many times have you been browsing the internet, with multiple tabs open, and closed the wrong one? Have you ever clicked 'Close all tabs' instead of 'Close current tab' ? Internet Explorer 8 now brings to you, what Firefox has had for a wh…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
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…
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

840 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