0
Maybe it doesn't exist but any help would be greatly appreciated
I'd like to simply save a current playlist to my own directory not WMP1's directory
I don't want to mess with WMP1's default directories


Private Sub Create_a_PlayList(ByRef songs() As String, ByVal name As String)

    Dim listCollection As IWMPPlaylistCollection
    Dim list As IWMPPlaylist
    Dim wmpMedia As IWMPMedia
    Dim i As Integer
    Dim PlayListArray As IWMPPlaylistArray

    'Set PlayListArray = listCollection.getAll
    'Set list = listCollection.newPlaylist(name)
    'wmplay.currentPlaylist = list

        ' This simple code creates a current playlist

        For i = 0 To UBound(songs)
            Set wmpMedia = wmplay.newMedia(songs(i))
            wmplay.currentPlaylist.appendItem wmpMedia
        Next i
        wmplay.Controls.play
        
        'Now, how do I  save this playlist to my directory, not the one
        'referenced by Windows Media Player
        ' where my directory = mdir
        ' something like wmplay.currentplaylist.save=mdir & name ???
        
End Sub

Thank you for looking
Paul
1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by paul1145
0
' This works, though a bit cumbersome
' need first to get the location of Windows Media Player1 library
' once in hand then, using FSO, copy and delete
'
'Would love to not need WMP library reference
'
Private Sub locate_em

    ml = GetFolder(Me.hwnd, "", "Locate Music / Playlist folder")
    wl = GetFolder(Me.hwnd, "", "Locate Windows Media Player Playlist folder")
    pl= inputbox("Enter playlist name","Playlistname")

End Sub

Private Sub Create_a_PlayList(ByRef songs() As String, ByVal name As String)
'.
'.
'.


    ' create the playlist entry in WMP library (My Documents\My Music\My Playlists)
    Set listCollection = wmplay.playlistCollection
    Set list = listCollection.newPlaylist(name)
    wmplay.currentPlaylist = list

    For i = 0 To UBound(songs)
        Set wmpMedia = wmplay.newMedia(songs(i))
        wmplay.currentPlaylist.appendItem wmpMedia
    Next i
    '   Play It
    wmplay.Controls.play
    
End Sub

Private Sub addtomyplaylist(m)

    'Copy from WMP to mine and delete one in WMP library
    Set fsys = CreateObject("Scripting.FileSystemObject")
    fsys.copyfile wl & "\" & m & ".wpl", ml & "\" & m & ".wpl", True
    Kill wl & "\" & m & ".wpl"
    Set fsys = Nothing
    
End Sub

Isn't there another way?
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.