Forum Discussion
Looking for alternatives to list properties of Word files
Hi Ricardo,
Yes, PowerShell is an excellent and suitable option for working with Word file properties! You can access both built-in and custom document properties using PowerShell, primarily by leveraging the Word COM (Component Object Model) object.
Here's how you can list all properties of a .docx file:
Thanks vihargadhesariya! It would take me eons to reach to the point you facilitated to me with your script! I opened it in VSCode and gave it a try.
Copilot helped me to edit the line:
$wordApp.DisplayAlerts = "wdAlertsNone" # wdAlertsNone = 0That now reads (I left as Copilot proposed although I could remove the comment!):
$wordApp.DisplayAlerts = 0 # wdAlertsNone = 0And here what I get:
PS C:\Users\ricar> . 'C:\Users\ricar\OneDrive\Documents\Downloads\listAllProperties.ps1'
Attempting to retrieve properties for: C:\Users\ricar\OneDrive\Documents\Downloads\IGFAE_2025_05_C05M01_2023-PG121_00_03_assessment_report.docx
Document opened successfully. Retrieving properties...
------------------------------
Built-In Document Properties:
------------------------------
Custom Document Properties:
No custom properties found.
------------------------------
All Properties (Table Format):
Name Value Type
---- ----- ----
Built-in
Built-in
Built-in
Built-in
Built-in
...
Built-in
Built-in
Built-in
Built-in
Built-in
Script finished.
PS C:\Users\ricar>Could you send to me a docx file working for you? Could you figure out why I'm getting of apparently empty and unnamed built-in properties and zero custom properties?
Check below what I'm seeing when inspecting properties of the referenced file:
Thank you so much for your help!
Ricardo
- RICARDO JULIO RODRIGUEZ FERNANDEZJun 10, 2025Copper Contributor
Hi! vihargadhesariya , do you know why I'm getting no data in the lists of properties? Thanks!