A collection of PowerShell cmdlets for handling Microsoft Office documents.
This project was started based on some old scripts I still had around. The main focus was simply having fun while converting them to more usable PowerShell modules and extending their original capabilities. Besides that, I used it as a purpose for engaging and gaining first experience with AI-assisted coding.
Purpose: Batch converts legacy Microsoft Office documents to modern XML-based formats.
Supported Conversions:
.doc→.docx.xls→.xlsx
Requirements:
- Word and Excel (any recent version)
- PowerShell 7.4 LTS or later
- Windows OS
Use Case:
- Convert legacy Microsoft Office documents to modern formats
- Ensure compatibility with current Microsoft Office versions
Features:
- Recursive directory scanning
- Automatic CSV logging
- Duplicate file protection
- Preserves original files
Purpose: Batch converts Microsoft Office documents to Open Document Format using LibreOffice.
Supported Conversions:
.doc,.docx→.odt.xls,.xlsx→.ods.ppt,.pptx→.odp
Requirements:
- LibreOffice (any recent version)
- PowerShell 7.4 LTS or later
- Windows OS
Use Case:
- Convert to vendor-independent file formats
- Migrate documents between different office suites
Features:
- Recursive directory scanning
- Automatic CSV logging
- Duplicate file protection
- Preserves original files
- Clone the repository
- Copy the
*.psm1files to your PowerShell modules directory - Import the modules in PowerShell
Convert all .doc and .xls files in a directory and its subdirectories to modern XML format:
Convert-LegacyDocumentToXMLDocument -Path "C:\Documents\Archive" -RecursiveConvert all Microsoft Office (Word, Excel and PowerPoint) files in a specific directory to ODF format:
Convert-OfficeDocumentToOpenDocument -Path "D:\Projects\Reports" -RecursiveThe code files in this repository were generated with assistance from artificial intelligence (AI). While the functionality has been tested and refined, please review the code carefully before using it in production environments. AI-assisted code may contain limitations or edge cases not covered by testing. Always maintain backups of your important documents before running batch conversion operations.
This project is licensed under the MIT License - see the LICENSE.md file for details.