Indeed, it doesn't seem to work as I indicate above, yet I remember being able to easily retrieve the custom properties of an Excel file (and even Word)...
I have the same problem. After several searches I found a way to do it with macros.
- you have to change your file to .xlsm (to manage macros)
- Create a new sheet in the Excel file (in 1st position)
- create a new macro named "Auto_Open" with this code:
Sub Auto_Open() infoWorkbookCustomDocumentProperties ActiveWorkbook End Sub
Sub infosWorkbookCustomDocumentProperties(Wb As Workbook) Dim Value As DocumentProperty Dim i As Byte
On Error Resume Next
'Loop on the collection of predefined properties For Each Value In Wb.CustomDocumentProperties i = i + 1 'Inserts the names of the properties in column A ThisWorkbook.Worksheets(1). Cells(i, 1) = Valeur.Name 'Inserts the contents of the property in column B ThisWorkbook.Worksheets(1). Cells(i, 2) = Value.Value Next
ThisWorkbook.Worksheets(1). Columns("A:B"). AutoFit End Sub
- run the macro
- link the cells to be filled with the properties retrieved from the first sheet