Point 1. This seems to work. Adjust file names and timings as required.
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
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.
Bookmarks