Forum Discussion

RICARDO JULIO RODRIGUEZ FERNANDEZ's avatar
May 31, 2025

Looking for alternatives to list properties of Word files

Hi! Looking for a way of improving my workflow with Word files and evaluate docx format capabilities, I'm searching for tools to work with its built-in and custom properties.

Please, is PowerShell a suitable option? How can I list all properties of a docx file?

Thanks for any insight!

Ricardo

3 Replies

  • 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:

    • RICARDO JULIO RODRIGUEZ FERNANDEZ's avatar
      RICARDO JULIO RODRIGUEZ FERNANDEZ
      Copper Contributor

      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 = 0

      That now reads (I left as Copilot proposed although I could remove the comment!):

      $wordApp.DisplayAlerts = 0 # wdAlertsNone = 0

      And 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

Resources