Power BI | MS-SQL | DAX | Power Apps | Power Automate
Power BI | MS-SQL | ETL with SSIS | VBA | Python
Advanced Excel | MIS Reporting | Power Query
VB Programming | VBA | MS-Office Automation
Power BI | Power Pivot | Power Query | Basic DAX
Advanced Excel | MIS Reporting | Model Building
This can be achieved by using the objects available in DSOFile.dll.
To begin with, add a reference to DSO Ole Document’s property library as shown in the below image.
Function GetPropFromDSO(ByVal sFile As String, ByVal sCP As String) As String
Dim oFil As DSOFile.OleDocumentProperties
Dim oCP As DSOFile.CustomPropertiesOn Error GoTo Err_Tp
Set oFil = New OleDocumentProperties
oFil.Open sFile, True
Set oCP = oFil.CustomProperties
GetRevFromDSO = oCP(sCP).Value
oFil.CloseErr_Tp:
If Err ;; 0 Then
Err.Clear
Resume Next
End IfEnd Function
The function gets the Filename and the Property to be extracted and returns the property value.
Explore comprehensive Course on Excel Automation or VB Programming here and, learn to write VB coding with ease.
Happy Excelling
Team Excelgoodies
VBA & Python
New
Next Batches Now Live