Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub GetDetails(FullNameAndPath As String)
'0 Retrieves the name of the item.
'1 Retrieves the size of the item.
'2 Retrieves the type of the item.
'3 Retrieves the date and time that the item was last modified.
'4 Retrieves the attributes of the item.
'-1 Retrieves the info tip information for the item.
Dim objShell As Shell
Dim objFolder As Folder
Dim f As String
Dim fp As String
Dim strT
If Right(FullNameAndPath, 1) = "\" Then
FullNameAndPath = Left(FullNameAndPath, Len(FullNameAndPath) - 1)
End If
f = Mid(FullNameAndPath, InStrRev(FullNameAndPath, "\") + 1)
fp = Mid(FullNameAndPath, 1, InStrRev(FullNameAndPath, "\"))
Set objShell = New Shell
Set objFolder = objShell.NameSpace(fp)
If (Not objFolder Is Nothing) Then
Dim objFolderItem As folderItem
Set objFolderItem = objFolder.ParseName(f)
If (Not objFolderItem Is Nothing) Then
Dim szItem As String
For i = -1 To 4
'Tip Info includes its own detail descriptions
strT = Choose((i + 2), "", "Name : ", "Size : ", "Type : ", "Last Modified : ", "Attributes : ")
szItem = objFolder.GetDetailsOf(objFolderItem, i)
Debug.Print strT & szItem
Next
End If
Set objFolderItem = Nothing
End If
Set objFolder = Nothing
Set objShell = Nothing
End Sub
Private Sub GetExtendedDetails(FullNameAndPath As String)
'Minimum DLL version shell32.dll version 5.0 or later
'Minimum operating systems Windows 2000, Windows Millennium
'References: Microsoft Shell Controls and Automation
'More info (put on one line): [URL unfurl="true"]http://msdn.microsoft.com/library/default.asp?url=[/URL]
'/library/en-us/shellcc/platform/shell/reference/objects/shellfolderitem/
'ExtendedProperty.asp
Dim objShell As Shell
Dim objFolder As Folder
Dim ToShow As Variant
Dim sPropName As String
Dim f As String
Dim fp As String
If Right(FullNameAndPath, 1) = "\" Then
FullNameAndPath = Left(FullNameAndPath, Len(FullNameAndPath) - 1)
End If
f = Mid(FullNameAndPath, InStrRev(FullNameAndPath, "\") + 1)
fp = Mid(FullNameAndPath, 1, InStrRev(FullNameAndPath, "\"))
Set objShell = New Shell
Set objFolder = objShell.NameSpace(fp)
ToShow = Split("DocTitle,Company,FileDescription,FileVersion,ProductName," _
& "ProductVersion", ",")
If (Not objFolder Is Nothing) Then
Dim objFolderItem As ShellFolderItem
Set objFolderItem = objFolder.ParseName(f)
If (Not objFolderItem Is Nothing) Then
Dim szItem As String
For i = 0 To UBound(ToShow)
sPropName = ToShow(i)
szItem = sPropName & " : " & objFolderItem.ExtendedProperty(sPropName)
Debug.Print szItem
Next
End If
Set objFolderItem = Nothing
End If
Set objFolder = Nothing
Set objShell = Nothing
End Sub