Thank you so much, it worked like a magic.
If I could ask two more things please.
1. How could I play more than one video in this loop?
2. How could I video on full screen.
Thank you so much.
Thank you so much, it worked like a magic.
If I could ask two more things please.
1. How could I play more than one video in this loop?
2. How could I video on full screen.
Thank you so much.
Point 1. This seems to work. Adjust file names and timings as required.
Point 2. Nothing I have tried works. I Googled this: excel vba make windows media player open full screen. Unfortunately, none of the suggestions helped although I could be missing something.![]()
Option Explicit Sub Macro1() Dim WMP As Object Set WMP = CreateObject("new:{6BF52A52-394A-11d3-B153-00C04F79FAA6}") Const FileName1 As String = "S:\test\abc.mp4" Const FileName2 As String = "S:\test\abc.mp4" Application.DisplayAlerts = False Do Dim i As Integer i = i + 1 ' get out of jail; adjust as required If i > 1 Then Exit Do Sheets("Sheet1").Select Range("A2").Select Application.Wait Now() + TimeValue("0:00:05") Sheets("Sheet2").Select Range("A2").Select Application.Wait Now() + TimeValue("0:00:05") Sheets("Sheet3").Select Range("A3").Select Application.Wait Now() + TimeValue("0:00:05") Sheets("Sheet4").Select Range("B3").Select 'insert code here to play video (19 sec), video is on S:\test\abc.mp4 Debug.Print "first" WMP.OpenPlayer FileName1 Application.Wait Now() + TimeValue("0:00:19") Debug.Print "second" WMP.OpenPlayer FileName2 Application.Wait Now() + TimeValue("0:00:19") 'Shell ("taskkill /f /im wmplayer.exe") Shell "CMD /C TASKKILL /IM wmplayer.exe" Debug.Print "end" Loop Application.DisplayAlerts = True End Sub
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Thank you so much for you help
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks