Shortmeister1
Board Regular
- Joined
- Feb 19, 2008
- Messages
- 207
- Office Version
- 365
- 2016
- 2013
- 2010
- 2007
- 2003 or older
- Platform
- Windows
Hi all
I wrote the code below, which quite happily informs me of a selection of file attributes. What I'm struggling with is how to change this from GetDetailsOf to something that would allow me to edit said attributes. Anyone able to give me a pointer please.
Thanks
Martin
I wrote the code below, which quite happily informs me of a selection of file attributes. What I'm struggling with is how to change this from GetDetailsOf to something that would allow me to edit said attributes. Anyone able to give me a pointer please.
Thanks
Martin
VBA Code:
Sub test4()
Dim sFile As Variant
Dim objShell
Dim objDir
Set objShell = CreateObject("Shell.Application")
Set objDir = objShell.Namespace("C:\Music\Bible In A Year")
For Each sFile In objDir.Items
If sFile.Name = "9781473640474_06_0115_BIOY.mp3" Then
Debug.Print objDir.GetDetailsOf(sFile, 14) 'Album Name
Debug.Print objDir.GetDetailsOf(sFile, 15) 'Year
Debug.Print objDir.GetDetailsOf(sFile, 21) 'Title
Debug.Print objDir.GetDetailsOf(sFile, 26) 'Index
Debug.Print objDir.GetDetailsOf(sFile, 237) 'Album Artist
End If
Next
Set objDir = Nothing
Set objShell = Nothing
End Sub