Setting Start Point in Hyperlinked Video

Z

ZipCurs

I am working in Excel 2007. I want to click on something and get an external
video to play, from a defined starting point to a defined ending point.
Hyperlinks have worked great for getting the whole thing to run, but I
haven't been able to figure out how to get them to give me the start/stop
point. I would be happy to use macros. Thank you in advance for any help.
 
J

joel

Where is the file located? A hyperlink could be on a local pc as
file, it could be imbedded in another document, it could be on th
web!!!
 
Z

ZipCurs

Hello Joel,

Thanks for responding. I am not sure how it matters and I could potentially
move them. Currently, the videos are located in a directory directly below
the Excel file that I am working in.
 
J

joel

The only way I believe it can be done is through a DLL. Depending o
the player you are using there is a DLL on you PC. For example th
windows player would be in the c:\windows folder. You can define th
Library call to any of the DLL entry points. I haven't done this m
selef but did find websites with examples. any example in C Language o
VB 6 using the dll can be converted to VBA.

Another approach would be to build a webpage with the controls. The
from VBA using an IE explorer application access the webpage. Ive ha
people ask me how to run java scripts in VBA and my answer was to creat
a webpage. So if you find any Java code then it could be put into
webpage
 
Z

ZipCurs

Joel,

Thanks for your responses. I have learned about putting a WMP onto a
userform, initiating a video with a shell, and playing a sound. I have found
quite a bit about commands using Jave script, which seem to have the
functionallity I need and more. I may ultimately need to learn more about
this and follow your suggestion regarding a webpage.

I am suprised that such a simple thing is not possible to do. Any further
words of wisdom would be welcome.

Thanks again.
 
J

joel

I've given up trying to use the Wijndows Media Player from VBA. I
didn't find much info on the web the last time I attempteed to program
the media player. I tried finding the DLL but there were a few
different DLL and the commands went well documented. People wanted to
get the music libraries into excel and I gave up.


VBA is really meant to be used by office products and other
functionality is there using the windos dll but it is not well
documented except for the web forums. You can get to a lot of features
using the VBA Reference libraries (menu tools - Reference). but you have
to know which function is in which library which isn't always easy to
find. Most of the experts learned using C lanaguage and adapted their C
Language expertese to VBA.

Microsoft compilers (Basic and C) have the libraries better documented
but the compilers still use the windos Dll just like VBA.
 
Z

ZipCurs

Hello Joel,

Thanks again for your support on this. Lamely, my ultimate solution might
just be putting the start and stop times in the UserForm caption, and let the
user deal with it.
 
Z

ZipCurs

Hello Joel,

I decided to be stubborn and it payed off to some extent. I now have the
following code for running an embedded Windows Media Player on a userform.
It actually starts where I want it to!

Dim MyStart As Long
MyStart = 30 'This seems to be in seconds

Application.EnableEvents = True
Load UserForm1
UserForm1.Caption = "My File : MyStart - MyFinish"
UserForm1.WindowsMediaPlayer1.settings.autoStart = False

UserForm1.WindowsMediaPlayer1.URL = "C:\Myfile.mpg"
UserForm1.WindowsMediaPlayer1.Controls.currentPosition = MyStart 'Jumps
to start location
UserForm1.WindowsMediaPlayer1.Controls.Play
UserForm1.Show

Do you have any ideas for how to stop this? I could use Application.OnTime,
but this seems a little lame. Is there some way of monitoring
Controls.currentPosition?

ZipCurs said:
Hello Joel,

Thanks again for your support on this. Lamely, my ultimate solution might
just be putting the start and stop times in the UserForm caption, and let the
user deal with it.

joel said:
I've given up trying to use the Wijndows Media Player from VBA. I
didn't find much info on the web the last time I attempteed to program
the media player. I tried finding the DLL but there were a few
different DLL and the commands went well documented. People wanted to
get the music libraries into excel and I gave up.


VBA is really meant to be used by office products and other
functionality is there using the windos dll but it is not well
documented except for the web forums. You can get to a lot of features
using the VBA Reference libraries (menu tools - Reference). but you have
to know which function is in which library which isn't always easy to
find. Most of the experts learned using C lanaguage and adapted their C
Language expertese to VBA.

Microsoft compilers (Basic and C) have the libraries better documented
but the compilers still use the windos Dll just like VBA.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=176787

Microsoft Office Help

.
 
J

joel

You are now using the EMP.DLL and any references you find in an
language you can convert to basic language and use in your code. Whe
you added the ICON to your userform it automatically added the librar
definition into excel. If yo go to the VBA menu tools - References yo
will see the media play checked at the top of the refrences.


to get the library definitions open the Object Browser in VBa menu vie
- Object Browser. Now type into the object browser search box (next t
the binoculars) WPM. The press the binoculars to do the search. You'l
find 1000 properties for the control. good Luck. I start to try t
work this control in the past and never found good documentation fro
microsoft.

I may be able to help if you find any references that you don'
understand. Since you found some JAVA info I would continue to bette
understand the JAVE which should lead you to the VBA solution
 
Top