Example module

A demonstration module that prints all Windows shell file properties for a chosen file to the Debug console.

Members

DisplayInDebugConsole

Opens a file and prints each of its shell properties – name and localized value – to the Debug console.

Syntax: DisplayInDebugConsole [ FilePath ]

FilePath
optional A String holding the full path of the file to inspect. If omitted or empty, a file dialog is displayed so the user can choose the file interactively.

DisplayInDebugConsole calls FilePropertyExplorer.OpenFile when FilePath is not empty, or FilePropertyExplorer.BrowseAndOpenFile otherwise. Each property in the returned FileProperties collection is printed on its own line: the system name (FileProperty.Name), then the localized value string (FileProperty.ValueDesc), positioned further right with Tab(80).

Example

This example prints all shell properties of a specific file to the Debug console by supplying a path directly.

Sub Main()
    Example.DisplayInDebugConsole "C:\Users\Public\Pictures\Sample.jpg"
End Sub

To use the interactive file-open dialog instead, call the procedure without an argument:

Sub Main()
    Example.DisplayInDebugConsole
End Sub

See Also