code/marco to shut down windows media player (1 Viewer)

smiler44

Registered User.
Local time
Today, 07:42
Joined
Jul 15, 2008
Messages
641
I have searched the net but not found anything that works.
I am in need of code or a macro to shut down windows media player.
windows version is windows 7

thank you in advance

smiler44
 

isladogs

MVP / VIP
Local time
Today, 07:42
Joined
Jan 14, 2017
Messages
18,186

Attachments

  • AccessMediaPlayer.zip
    1.3 MB · Views: 127
Last edited:

smiler44

Registered User.
Local time
Today, 07:42
Joined
Jul 15, 2008
Messages
641
isladogs, it could be me but u follwd these instructions from the web page you have given
In Microsoft Word, Excel, and PowerPoint®, you embed the control by selecting Object from the Insert menu, then choosing Windows Media Player from the list of available object types. The Windows Media Player control appears in the document at the current location. You can then select Format Control ( Format Object in Excel) from the shortcut menu for the control to adjust the layout, text wrapping style, and other format options. In Word and Excel, you must be in design mode to do this.


I dont have windows media player in the list.
Not sure if i should click create from file but i dont know what to do.

I dont think i understand about playing files directly within Excel

smiler44
 

isladogs

MVP / VIP
Local time
Today, 07:42
Joined
Jan 14, 2017
Messages
18,186
I'm sorry but although I'd like to help I don't have direct access to WMP & rarely develop in Excel these days

I was suggesting playing media files direct in Access (hence the example video)
I don't know if you can do so in Excel

Suggest you ask in a specialist Excel forum such as Mr Excel.com
 

smiler44

Registered User.
Local time
Today, 07:42
Joined
Jul 15, 2008
Messages
641
update
i have embeded wmplayer as an object.
when i hover over it my courser becomes a 4 arrowed cross, if i double click i get a security warning asking me if i want to run this software.


this has me thinking. i select the songs i want to play by highlighting them via windows explorer then clicking play. this in turn opens windows media player

smiler44
 

smiler44

Registered User.
Local time
Today, 07:42
Joined
Jul 15, 2008
Messages
641
update, i should have assigned a macro the the emdeded icon so it becomes clickable and the cursor stops being a 4 arrowed cross

smiler44
 

smiler44

Registered User.
Local time
Today, 07:42
Joined
Jul 15, 2008
Messages
641
yes Mr Excel is also a very good forum.

i'll play a bit more but thank you for your time, i appreciate it

smiler44
 

smiler44

Registered User.
Local time
Today, 07:42
Joined
Jul 15, 2008
Messages
641
another hunt on the net and I found this on Excel forum and it works
Shell ("taskkill /f /im calc.exe")

with this note
This basically kills that task. Replace calc.exe with the file name of the medial player that you are using

smiler44
 

isladogs

MVP / VIP
Local time
Today, 07:42
Joined
Jan 14, 2017
Messages
18,186
Well done. You can now sleep soundly at night with no music playing ;)
 

Users who are viewing this thread

Top Bottom