Utilities for inspecting Microsoft Project MPP files with VBScript and VBA.
Both reports output Microsoft Project file details without saving changes to the MPP file. The report includes:
- File size
- Project properties
- Built-in document properties
- Custom document properties
- Custom field names
Custom fields are printed in this format:
Text11: PO Description
Number12: Physical Percent Complete
Flag2: Work Order Executed
Requires:
- Windows
- Microsoft Project desktop installed
- Access to the target
.mppfile - Windows Script Host for running the VBScript report with
cscript - Microsoft Project VBA access for importing and running the VBA report
Developed and tested on:
- Windows 11
- Microsoft Project Online Desktop Client MSO, Version 2606 Build 16.0.20131.20154, 64-bit
Use vbscript/project-report.vbs when you want to open an MPP file by path, print the report to the console, and close the file without saving changes.
From PowerShell, set the MPP path and run the script with cscript:
$mppFile = "C:\path\to\project.mpp"
cscript //nologo .\vbscript\project-report.vbs $mppFileOr pass the path directly:
cscript //nologo .\vbscript\project-report.vbs "C:\path\to\project.mpp"Optionally, to make .vbs files run with cscript by default, open an administrator terminal and run:
cscript //H:CScriptAfter that, you can run the script without explicitly calling cscript:
.\vbscript\project-report.vbs "C:\path\to\project.mpp"The script starts or attaches to Microsoft Project, opens the MPP file, prints the report, then closes the MPP without saving changes.
Use vba/project-report.bas when the MPP file is already open in Microsoft Project and you want the report printed to the VBA Immediate Window.
- Open the target
.mppfile in Microsoft Project. - Press
Alt+F11to open the VBA editor. - In the VBA editor, select the project for the open MPP file in the Project Explorer.
- Select
File>Import File.... - Choose
vba/project-report.basfrom this repo. - Press
Ctrl+Gto show the Immediate Window. - Run the macro
PrintActiveProjectReportToImmediate.
You can run the macro from Run > Run Sub/UserForm, or from the Immediate Window with:
PrintActiveProjectReportToImmediateThe macro prints the report for the active project.