Is it possible to 'Advance' Windows Media Player, once Excel has launched it?

pcc

Well-known Member
Joined
Jan 21, 2003
Messages
1,382
Office Version
  1. 2021
Platform
  1. Windows
I have this code as part of a much bigger project to play mp3 files (where the filename, in this case, is in Cells(r, 1). It fires up Windows Media Player and plays the file.
Many of the files have been recorded from internet radio stations, and often they are not 'clean' - for example they may have the tail end of a previous song at the start, or the beginning of another song at the end. If this is the case, I can use an mp3 editor to trim away the unwanted bits.
If a file starts to play, and it has unwanted stuff at the start, I can flag it for editing later on and progress to the next file. However, a file might be 'clean' at the start, and have rubbish at the end, and the only way I can tell is to let the file finish playing to see if there is any rubbish at the end, and this obviously takes time. I would ideally like to be able to advance Media Player towards the end of the file to see if this is the case. My system knows the length of each mp3 file, so I would like to advance it to, say, 5 seconds before the end. I could then vet each file much quicker.
Can anyone suggest a way in which this could be achieved?

All suggestions welcomed!

Thanks


VBA Code:
Set wmp = CreateObject("new:6BF52A52-394A-11D3-B153-00C04F79FAA6")
With wmp
.URL = Cells(r, 1)
.Controls.Play
End With
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Thanks for that. I will do some investigation to see if I can fathom this out.
Regards
 
Upvote 0
Looks like I can use the Currentposition parameter to achieve this. Just need to check it out. Thanks very much for the suggestion.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top