├── .devcontainer └── devcontainer.json ├── .github ├── dependabot.yml └── workflows │ ├── draft_release.yml │ ├── rubberduck_demo.yml │ ├── screenshot_demo.yml │ └── tests.yml ├── .gitignore ├── LICENSE ├── Main.ps1 ├── README.md ├── action.yml ├── archive └── AccessDatabase.accdb │ ├── DBSource │ └── AccessDatabase.accdb │ └── Modules │ ├── Module1.bas │ └── modMapping.bas ├── images └── Banner.png ├── scripts ├── Build-VBA.ps1 ├── Clean-Up.ps1 ├── Enable-VBOM.ps1 ├── Install-Rubberduck-VBA.ps1 ├── Open-Close-Office.ps1 ├── Rename-It.ps1 ├── Tests-Rubberduck-VBA.ps1 ├── Zip-It.ps1 └── utils │ ├── Minimize.ps1 │ ├── Object-Import.ps1 │ ├── Path.ps1 │ └── Screenshot.ps1 └── tests ├── ExcelAddin.xlam ├── Class Modules │ └── Class1.cls ├── Microsoft Excel Objects │ ├── Sheet1.cls │ └── ThisWorkbook.cls ├── Modules │ ├── FunctionCollection.bas │ ├── Module1.bas │ ├── RunTests.bas │ └── TestsForIsCapitalLetterFunction.bas └── XMLsource │ ├── [Content_Types].xml │ ├── _rels │ └── .rels │ ├── docProps │ ├── app.xml │ └── core.xml │ └── xl │ ├── _rels │ └── workbook.xml.rels │ ├── styles.xml │ ├── theme │ └── theme1.xml │ ├── workbook.xml │ └── worksheets │ └── sheet1.xml ├── ExcelBinaryWorkbook.xlsb ├── Modules │ └── Module1.bas └── XMLsource │ ├── [Content_Types].xml │ ├── _rels │ └── .rels │ ├── docProps │ ├── app.xml │ └── core.xml │ └── xl │ ├── _rels │ └── workbook.xml.rels │ ├── styles.xml │ ├── theme │ └── theme1.xml │ ├── workbook.xml │ └── worksheets │ └── sheet1.xml ├── ExcelWorkbook.xlsm ├── Microsoft Excel Objects │ ├── Sheet1.sheet.cls │ └── ThisWorkbook.wbk.cls ├── Modules │ └── Module1.bas └── XMLsource │ ├── [Content_Types].xml │ ├── _rels │ └── .rels │ ├── docProps │ ├── app.xml │ └── core.xml │ └── xl │ ├── _rels │ └── workbook.xml.rels │ ├── styles.xml │ ├── theme │ └── theme1.xml │ ├── workbook.xml │ └── worksheets │ └── sheet1.xml ├── PowerPointAddin.ppam ├── Modules │ └── Module1.bas └── XMLsource │ ├── [Content_Types].xml │ ├── _rels │ └── .rels │ ├── docProps │ ├── app.xml │ ├── core.xml │ └── thumbnail.jpeg │ └── ppt │ ├── _rels │ └── presentation.xml.rels │ ├── presProps.xml │ ├── presentation.xml │ ├── slideLayouts │ ├── _rels │ │ ├── slideLayout1.xml.rels │ │ ├── slideLayout10.xml.rels │ │ ├── slideLayout11.xml.rels │ │ ├── slideLayout2.xml.rels │ │ ├── slideLayout3.xml.rels │ │ ├── slideLayout4.xml.rels │ │ ├── slideLayout5.xml.rels │ │ ├── slideLayout6.xml.rels │ │ ├── slideLayout7.xml.rels │ │ ├── slideLayout8.xml.rels │ │ └── slideLayout9.xml.rels │ ├── slideLayout1.xml │ ├── slideLayout10.xml │ ├── slideLayout11.xml │ ├── slideLayout2.xml │ ├── slideLayout3.xml │ ├── slideLayout4.xml │ ├── slideLayout5.xml │ ├── slideLayout6.xml │ ├── slideLayout7.xml │ ├── slideLayout8.xml │ └── slideLayout9.xml │ ├── slideMasters │ ├── _rels │ │ └── slideMaster1.xml.rels │ └── slideMaster1.xml │ ├── slides │ ├── _rels │ │ └── slide1.xml.rels │ └── slide1.xml │ ├── tableStyles.xml │ ├── theme │ └── theme1.xml │ └── viewProps.xml ├── PowerPointPresentation.pptm ├── Modules │ └── Module1.bas └── XMLsource │ ├── [Content_Types].xml │ ├── _rels │ └── .rels │ ├── docProps │ ├── app.xml │ ├── core.xml │ └── thumbnail.jpeg │ └── ppt │ ├── _rels │ └── presentation.xml.rels │ ├── presProps.xml │ ├── presentation.xml │ ├── slideLayouts │ ├── _rels │ │ ├── slideLayout1.xml.rels │ │ ├── slideLayout10.xml.rels │ │ ├── slideLayout11.xml.rels │ │ ├── slideLayout2.xml.rels │ │ ├── slideLayout3.xml.rels │ │ ├── slideLayout4.xml.rels │ │ ├── slideLayout5.xml.rels │ │ ├── slideLayout6.xml.rels │ │ ├── slideLayout7.xml.rels │ │ ├── slideLayout8.xml.rels │ │ └── slideLayout9.xml.rels │ ├── slideLayout1.xml │ ├── slideLayout10.xml │ ├── slideLayout11.xml │ ├── slideLayout2.xml │ ├── slideLayout3.xml │ ├── slideLayout4.xml │ ├── slideLayout5.xml │ ├── slideLayout6.xml │ ├── slideLayout7.xml │ ├── slideLayout8.xml │ └── slideLayout9.xml │ ├── slideMasters │ ├── _rels │ │ └── slideMaster1.xml.rels │ └── slideMaster1.xml │ ├── slides │ ├── _rels │ │ └── slide1.xml.rels │ └── slide1.xml │ ├── tableStyles.xml │ ├── theme │ └── theme1.xml │ └── viewProps.xml └── WordDocument.docm ├── Class Modules └── Class1.cls ├── Microsoft Word Objects └── ThisDocument.doc.cls ├── Modules └── Module1.bas └── XMLsource ├── [Content_Types].xml ├── _rels └── .rels ├── docProps ├── app.xml └── core.xml └── word ├── _rels └── document.xml.rels ├── document.xml ├── fontTable.xml ├── settings.xml ├── styles.xml ├── theme └── theme1.xml └── webSettings.xml /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/alpine 3 | { 4 | "name": "Alpine", 5 | // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile 6 | "image": "mcr.microsoft.com/devcontainers/base:alpine-3.20", 7 | "features": { 8 | "ghcr.io/cirolosapio/devcontainers-features/alpine-node:0": { 9 | "corepack": true, 10 | "pnpmVersion": "latest" 11 | }, 12 | "ghcr.io/devcontainers/features/powershell:1": { 13 | "version": "7.4" 14 | } 15 | }, 16 | "customizations": { 17 | "vscode": { 18 | "extensions": [ 19 | "ms-vscode.powershell", 20 | "github.vscode-github-actions" 21 | ] 22 | } 23 | } 24 | 25 | // Features to add to the dev container. More info: https://containers.dev/features. 26 | // "features": {}, 27 | 28 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 29 | // "forwardPorts": [], 30 | 31 | // Use 'postCreateCommand' to run commands after the container is created. 32 | // "postCreateCommand": "uname -a", 33 | 34 | // Configure tool-specific properties. 35 | // "customizations": {}, 36 | 37 | // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. 38 | // "remoteUser": "root" 39 | } 40 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for more information: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | # https://containers.dev/guide/dependabot 6 | 7 | version: 2 8 | updates: 9 | - package-ecosystem: "devcontainers" 10 | directory: "/" 11 | schedule: 12 | interval: weekly 13 | -------------------------------------------------------------------------------- /.github/workflows/draft_release.yml: -------------------------------------------------------------------------------- 1 | name: Create Release 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | version_bump: 7 | description: 'Which part of the version to bump (major, minor, patch)' 8 | required: true 9 | default: 'patch' 10 | type: choice 11 | options: 12 | - major 13 | - minor 14 | - patch 15 | 16 | permissions: 17 | contents: write 18 | 19 | jobs: 20 | release: 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - name: Checkout selected branch 25 | uses: actions/checkout@v4 26 | with: 27 | ref: ${{ github.ref_name }} 28 | fetch-depth: 0 # Fetch full history including tags 29 | fetch-tags: true 30 | 31 | - name: Get latest tag 32 | id: get_tag 33 | run: | 34 | latest_tag=$(git tag --sort=-v:refname | grep -E '^v?[0-9]+\.[0-9]+\.[0-9]+' | head -n1) 35 | echo "Latest tag: $latest_tag" 36 | if [[ -z "$latest_tag" ]]; then 37 | echo "tag=0.0.0" >> $GITHUB_OUTPUT 38 | else 39 | echo "tag=${latest_tag#v}" >> $GITHUB_OUTPUT 40 | fi 41 | 42 | - name: Calculate next version 43 | id: bump_version 44 | run: | 45 | IFS='.' read -r major minor patch <<< "${{ steps.get_tag.outputs.tag }}" 46 | case "${{ github.event.inputs.version_bump }}" in 47 | major) 48 | ((major+=1)); minor=0; patch=0;; 49 | minor) 50 | ((minor+=1)); patch=0;; 51 | patch) 52 | ((patch+=1));; 53 | esac 54 | new_version="v$major.$minor.$patch" 55 | echo "New version: $new_version" 56 | echo "new_tag=$new_version" >> $GITHUB_OUTPUT 57 | 58 | - name: Create new Git tag 59 | run: | 60 | git config user.name "github-actions" 61 | git config user.email "github-actions@github.com" 62 | git tag ${{ steps.bump_version.outputs.new_tag }} 63 | git push origin ${{ steps.bump_version.outputs.new_tag }} 64 | 65 | - name: Create Release 66 | uses: softprops/action-gh-release@v2 67 | with: 68 | tag_name: ${{ steps.bump_version.outputs.new_tag }} 69 | target_commitish: ${{ github.ref_name }} 70 | generate_release_notes: true 71 | draft: true 72 | env: 73 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 74 | -------------------------------------------------------------------------------- /.github/workflows/rubberduck_demo.yml: -------------------------------------------------------------------------------- 1 | name: Rubberduck 2 | on: 3 | workflow_dispatch: 4 | jobs: 5 | install-rubberduck: 6 | runs-on: windows-latest 7 | steps: 8 | - name: "Checkout" 9 | uses: actions/checkout@v4 10 | 11 | - name: "Install Rubberduck" 12 | run: | 13 | # Install Rubberduck 14 | . "./scripts/Install-Rubberduck-VBA.ps1" 15 | -------------------------------------------------------------------------------- /.github/workflows/screenshot_demo.yml: -------------------------------------------------------------------------------- 1 | #Create a simple workflow to take a screenshot of the Windows worker's desktop 2 | name: Screenshot 3 | on: 4 | workflow_dispatch: 5 | jobs: 6 | screenshot: 7 | runs-on: windows-latest 8 | steps: 9 | - name: "Checkout" 10 | uses: actions/checkout@v4 11 | - name: "Take Screenshot" 12 | run: | 13 | # Minimize the CMD window 14 | . "./scripts/utils/Minimize.ps1" 15 | Minimize-Window "Administrator: C:\actions" 16 | # Take a screenshot of the Office application 17 | . "./scripts/utils/Screenshot.ps1" 18 | Take-Screenshot -OutputPath "Screenshot.png" 19 | - name: "Upload Screenshot" 20 | uses: actions/upload-artifact@v4 21 | with: 22 | name: "Screenshot" 23 | path: "screenshot.png" -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Test Build VBA 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: 6 | - main 7 | - dev* 8 | paths-ignore: 9 | - '**/README.md' 10 | 11 | permissions: 12 | id-token: write 13 | attestations: write 14 | 15 | jobs: 16 | build: 17 | runs-on: windows-latest 18 | steps: 19 | - name: "Checkout" 20 | uses: actions/checkout@v4 21 | - name: "Build VBA-Enabled Documents (using own action)" 22 | id: build_vba 23 | uses: ./ 24 | with: 25 | source-dir: "./tests" 26 | test-framework: "rubberduck" 27 | timeout-minutes: 20 28 | - name: "Upload Build Artifact" 29 | uses: actions/upload-artifact@v4 30 | id: "upload" 31 | with: 32 | name: "VBA-Enabled-Documents" 33 | path: "./tests/out/*" 34 | if-no-files-found: warn 35 | - name: "Take exiting screenshot" 36 | if: always() 37 | run: | 38 | . "./scripts/utils/Screenshot.ps1" 39 | # Create the directory if it does not exist 40 | if (!(Test-Path -Path ${{ github.workspace }}/tests/screenshots)) { 41 | New-Item -ItemType Directory -Path ${{ github.workspace }}/tests/screenshots 42 | } 43 | # Minimize PowerShell window 44 | . "./scripts/utils/Minimize.ps1" 45 | Minimize-Window "Administrator: C:\Program Files\PowerShell\7\pwsh.EXE" 46 | Take-Screenshot -OutputPath ${{ github.workspace }}/tests/screenshots/ExitScreenshot.png 47 | shell: pwsh 48 | # TODO: Check if better method to visualize the screenshots: https://github.com/actions/upload-artifact/issues/14 49 | - name: "Upload Screenshots" 50 | # Run this step even if the build failed 51 | if: always() 52 | uses: actions/upload-artifact@v4 53 | with: 54 | name: "Screenshots" 55 | path: "./tests/screenshots/*" 56 | if-no-files-found: warn 57 | - name: "Attestation" 58 | uses: actions/attest-build-provenance@v2 59 | with: 60 | subject-name: "VBA-Enabled-Documents" 61 | subject-digest: sha256:${{ steps.upload.outputs.artifact-digest }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Template from: https://github.com/DecimalTurn/VBA-on-GitHub 2 | 3 | # Office temporary files 4 | ~$* 5 | 6 | # Access database lock files (laccdb, ldb) 7 | *.[lL][aA][cC][cC][dD][bB] 8 | *.[lL][dD][bB] 9 | 10 | # The following sections constitute a list of Office file extensions that support VBA. 11 | # If you want to exclude Office files from your repo, uncomment the corresponding file extensions. 12 | 13 | # Excel (xls, xlsb, xlsm, xlt, xltm, xla, xlam) 14 | #*.[xX][lL][sS] 15 | #*.[xX][lL][sS][bB] 16 | #*.[xX][lL][sS][mM] 17 | #*.[xX][lL][tT] 18 | #*.[xX][lL][tT][mM] 19 | #*.[xX][lL][aA] 20 | #*.[xX][lL][aA][mM] 21 | 22 | # Word (doc, docm, dot, dotm) 23 | #*.[dD][oO][cC] 24 | #*.[dD][oO][cC][mM] 25 | #*.[dD][oO][tT] 26 | #*.[dD][oO][tT][mM] 27 | 28 | # Access (accda, accdb, accde, mdb, mde) 29 | #*.[aA][cC][cC][dD][aA] 30 | #*.[aA][cC][cC][dD][bB] 31 | #*.[aA][cC][cC][dD][eE] 32 | #*.[mM][dD][bB] 33 | #*.[mM][dD][eE] 34 | 35 | # PowerPoint (ppt, pptm, pot, potm, pps, ppsm) 36 | #*.[pP][pP][tT] 37 | #*.[pP][pP][tT][mM] 38 | #*.[pP][oO][tT] 39 | #*.[pP][oO][tT][mM] 40 | #*.[pP][pP][sS] 41 | #*.[pP][pP][sS][mM] 42 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Martin Leduc 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | 1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | 2. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /Main.ps1: -------------------------------------------------------------------------------- 1 | # Get the source directory from command line argument or use default "src" 2 | param( 3 | [string]$SourceDir = "src", 4 | [string]$TestFramework = "none" # Default to "none" if not specified 5 | ) 6 | 7 | Write-Host "Current directory: $(pwd)" 8 | Write-Host "Using source directory: $SourceDir" 9 | 10 | # Read name of the folders under the specified source directory into an array 11 | $CurrentWorkingDir = Get-Location 12 | $folders = Get-ChildItem -Path "$CurrentWorkingDir/$SourceDir" -Directory | Select-Object -ExpandProperty Name 13 | Write-Host "Folders in ${SourceDir}: $folders" 14 | 15 | # Check if the folders array is empty 16 | if ($folders.Count -eq 0) { 17 | Write-Host "No folders found in ${SourceDir}. Exiting script." 18 | exit 1 19 | } 20 | 21 | $officeApps = @() 22 | 23 | function Get-OfficeApp { 24 | param ( 25 | [Parameter(Mandatory=$true)] 26 | [string]$FileExtension 27 | ) 28 | 29 | switch -Regex ($FileExtension.ToLower()) { 30 | '^(xlsb|xlsm||xltm|xlam)$' { return "Excel" } 31 | '^(docm|dotm)$' { return "Word" } 32 | '^(pptm|potm|ppam)$' { return "PowerPoint" } 33 | '^(accdb|accda)$' { return "Access" } 34 | default { return $null } 35 | } 36 | } 37 | 38 | # Create a list of Office applications that are needed based on the file extensions of the folders 39 | foreach ($folder in $folders) { 40 | $FileExtension = $folder.Substring($folder.LastIndexOf('.') + 1) 41 | $app = Get-OfficeApp -FileExtension $FileExtension 42 | 43 | if ($app) { 44 | if ($officeApps -notcontains $app) { 45 | $officeApps += $app 46 | } 47 | } else { 48 | Write-Host "Unknown file extension: $FileExtension. Skipping..." 49 | continue 50 | } 51 | } 52 | 53 | # We need to open and close the Office applications before we can enable VBOM 54 | Write-Host "Open and close Office applications" 55 | . "$PSScriptRoot/scripts/Open-Close-Office.ps1" $officeApps 56 | Write-Host "=========================" 57 | 58 | 59 | if ($TestFramework -ieq "rubberduck") { 60 | Write-Host "Install Rubberduck" 61 | . "$PSScriptRoot/scripts/Install-Rubberduck-VBA.ps1" 62 | Write-Host "=========================" 63 | } else { 64 | Write-Host "Test framework is not Rubberduck. Skipping installation." 65 | } 66 | 67 | # Enable VBOM for each Office application 68 | Write-Host "Enabling VBOM for Office applications" 69 | foreach ($app in $officeApps) { 70 | Write-Host "Enabling VBOM for $app" 71 | . "$PSScriptRoot/scripts/Enable-VBOM.ps1" $app 72 | Write-Host "=========================" 73 | } 74 | 75 | # To get better screenshots we need to minimize the "Administrator" CMD window 76 | $scriptPath = Split-Path -Parent $MyInvocation.MyCommand.Path 77 | . "$scriptPath/scripts/utils/Minimize.ps1" 78 | 79 | 80 | # Import scripts 81 | . "$PSScriptRoot/scripts/Tests-Rubberduck-VBA.ps1" # Import the Rubberduck testing script 82 | . "$PSScriptRoot/scripts/Clean-Up.ps1" # Import the Clean-Up.ps1 script 83 | 84 | Minimize-Window "Administrator: C:\actions" 85 | Write-Host "=========================" 86 | 87 | foreach ($folder in $folders) { 88 | $fileExtension = $folder.Substring($folder.LastIndexOf('.') + 1) 89 | $app = Get-OfficeApp -FileExtension $fileExtension 90 | 91 | if ($app -eq "Access") { 92 | Write-Host "Access is not supported at the moment. Skipping..." 93 | continue 94 | } 95 | 96 | Write-Host "▶️ Processing folder: $folder" 97 | 98 | $ext = "zip" 99 | Write-Host "Create Zip file and rename it to Office document target" 100 | . "$PSScriptRoot/scripts/Zip-It.ps1" "${SourceDir}/${folder}" 101 | 102 | Write-Host "Copy and rename the file to the correct name" 103 | . "$PSScriptRoot/scripts/Rename-It.ps1" "${SourceDir}/${folder}" "$ext" 104 | 105 | Write-Host "Importing VBA code into Office document" 106 | . "$PSScriptRoot/scripts/Build-VBA.ps1" "${SourceDir}/${folder}" "$app" 107 | if ($LASTEXITCODE -ne 0) { 108 | Write-Host "Build-VBA.ps1 failed with exit code $LASTEXITCODE" 109 | exit $LASTEXITCODE 110 | } 111 | 112 | if ($TestFramework -ieq "rubberduck" -and $fileExtension -ne "ppam") { 113 | Write-Host "Running tests with Rubberduck" 114 | $rubberduckTestResult = Test-WithRubberduck -officeApp $officeApp 115 | if (-not $rubberduckTestResult) { 116 | Write-Host "Rubberduck tests were not completed successfully, but continuing with the script..." 117 | } 118 | } else { 119 | if ($fileExtension -eq "ppam") { 120 | Write-Host "Skipping tests for PowerPoint add-in (.ppam) files since Rubberduck can't run tests on them directly." 121 | } else { 122 | Write-Host "Test framework is not Rubberduck. Skipping tests." 123 | } 124 | } 125 | 126 | Write-Host "Cleaning up" 127 | CleanUp-OfficeApp -officeApp $officeApp 128 | 129 | Write-Host "=========================" 130 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VBA-Build 2 | 3 | For a demo on how to use this GitHub Action: [VBA-Build-Demo](https://github.com/DecimalTurn/VBA-Build-Demo) 4 | 5 | ![Banner](https://github.com/DecimalTurn/VBA-Build/blob/main/images/Banner.png?raw=true) 6 | 7 | ## How does it work? 8 | 9 | This GitHub Action automates the process of building VBA-Enabled Office documents from XML and VBA source code: 10 | 11 | The main script is contained in `Main.ps1` and will perform the following actions: 12 | 13 | - Install 7-Zip for handling file compression 14 | - Install Office 365 (via Chocolatey) to provide the Office applications needed 15 | - Create Office file from XML source: 16 | - Find the XML source files representing your Office document structure 17 | - Compress them into a zip file using 7-Zip 18 | - Rename the zip file with the appropriate Office extension (e.g., .xlsm) 19 | - Import the VBA components: 20 | - Enable the Visual Basic Object Model (VBOM) and general macro permissions in the registry of the Windows GitHub Worker 21 | - Opens the Office file and imports all modules (.bas), Forms (.frm) and Class Modules (.cls) from your source directory 22 | - Run tests: 23 | - If a testing framework was specified, install the required dependencies 24 | - Run the tests and output the results to the console 25 | - Generate final output: 26 | - Save the final document with embedded VBA code 27 | - Upload the resulting documents as build artifacts 28 | 29 | ## Supported File Formats 30 | 31 | * Excel (.xlsm, .xlam and .xlsb) 32 | * Word (.docm) 33 | * PowerPoint (.pptm, .ppam) 34 | 35 | ## Why? 36 | 37 | I mean, why not? Every other programming language has something like this to build and package your code. 38 | 39 | This could be used to: 40 | 41 | - Keep your VBA code in plain text format for version control 42 | - Automate builds as part of your CI/CD pipeline 43 | - Generate ready-to-use Office documents without manual intervention 44 | 45 | ## What's next? 46 | 47 | Depending on the reaction of the community, I might add support for: 48 | - Template formats .xltm, .dotm and .potm 49 | - Signature of the VBA Project (to facilitate distribution) 50 | - More complex file structure using [vba-block](https://www.vba-blocks.com/manifest/) configuration file (manifest file) 51 | - Microsoft Access file formats 52 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "VBA Build" 2 | description: "Build VBA-Enabled Office documents from source code using GitHub Actions." 3 | 4 | branding: 5 | icon: 'code' 6 | color: 'blue' 7 | 8 | inputs: 9 | source-dir: 10 | description: 'Relative path to the directory containing the source folders' 11 | required: false 12 | default: 'src' 13 | test-framework: 14 | description: 'The test framework to use for the build process.' 15 | required: false 16 | default: 'none' 17 | 18 | runs: 19 | using: "composite" 20 | steps: 21 | - name: "Install 7-zip" 22 | shell: pwsh 23 | run: choco install 7zip.install 24 | # https://community.chocolatey.org/packages?q=Excel 25 | - name: "Installing Office 365 (takes about 5 minutes...)" 26 | id: "install_office" 27 | shell: pwsh 28 | run: choco install office365proplus -y 29 | - name: "Display Chocolatey logs in case of Office install failure" 30 | if: failure() && steps.install_office.outcome == 'failure' 31 | run: | 32 | if (Test-Path -Path "C:\ProgramData\chocolatey\logs\chocolatey.log") { 33 | Write-Host "============ Chocolatey Log Contents ============" 34 | Get-Content -Path "C:\ProgramData\chocolatey\logs\chocolatey.log" 35 | Write-Host "============ End of Chocolatey Logs =============" 36 | } else { 37 | Write-Host "Chocolatey log file not found at C:\ProgramData\chocolatey\logs\chocolatey.log" 38 | } 39 | shell: pwsh 40 | - name: "Run VBA Build" 41 | shell: pwsh 42 | run: '${{ github.action_path }}\Main.ps1 -SourceDir "${{ inputs.source-dir }}" -TestFramework "${{ inputs.test-framework }}"' 43 | outputs: 44 | result: 45 | description: "The result of the VBA build process." 46 | value: "success" 47 | -------------------------------------------------------------------------------- /archive/AccessDatabase.accdb/DBSource/AccessDatabase.accdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DecimalTurn/VBA-Build/578bed902f441bdda9c40e70863e43953ad46fbd/archive/AccessDatabase.accdb/DBSource/AccessDatabase.accdb -------------------------------------------------------------------------------- /archive/AccessDatabase.accdb/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Sub WriteToFile() 12 | Dim filePath As String 13 | Dim fileNum As Integer 14 | 15 | ' Specify the path to the text file 16 | filePath = CurrentProject.Path & "\AccessDatabase.txt" 17 | 18 | ' Get a free file number 19 | fileNum = FreeFile 20 | 21 | ' Open the file for output 22 | Open filePath For Output As #fileNum 23 | 24 | ' Write some text to the file 25 | Print #fileNum, "Hello, World!" 26 | 27 | ' Close the file 28 | Close #fileNum 29 | End Sub -------------------------------------------------------------------------------- /archive/AccessDatabase.accdb/Modules/modMapping.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "modMapping" 2 | Option Compare Database 3 | Option Explicit 4 | 5 | Function OpenMap(Address, City, State, Zip, Country) 6 | 7 | Dim strAddress As String 8 | strAddress = Nz(Address) 9 | strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(City) 10 | strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(State) 11 | strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(Zip) 12 | strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(Country) 13 | 14 | If strAddress = "" Then 15 | MsgBox "There is no address to map." 16 | Else 17 | Application.FollowHyperlink "http://maps.live.com/default.aspx?where1=" & strAddress 18 | End If 19 | End Function 20 | -------------------------------------------------------------------------------- /images/Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DecimalTurn/VBA-Build/578bed902f441bdda9c40e70863e43953ad46fbd/images/Banner.png -------------------------------------------------------------------------------- /scripts/Clean-Up.ps1: -------------------------------------------------------------------------------- 1 | # This script will make sure that the Office application is closed with all documents to avoid any issues 2 | # when building the next VBA project. 3 | function CleanUp-OfficeApp { 4 | param ( 5 | [Parameter(Mandatory=$true)] 6 | $officeApp 7 | ) 8 | 9 | # Close all documents based on the application type 10 | try { 11 | # Determine the application type and close all open documents 12 | if ($officeApp.Name -eq "Microsoft Excel") { 13 | # Excel - close all workbooks 14 | for ($i = $officeApp.Workbooks.Count; $i -ge 1; $i--) { 15 | $workbook = $officeApp.Workbooks.Item($i) 16 | $workbook.Close($false) # Close without saving changes 17 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($workbook) | Out-Null 18 | } 19 | Write-Host "All Excel workbooks closed successfully" 20 | } 21 | elseif ($officeApp.Name -eq "Microsoft Word") { 22 | # Word - close all documents 23 | for ($i = $officeApp.Documents.Count; $i -ge 1; $i--) { 24 | $document = $officeApp.Documents.Item($i) 25 | $document.Close($false) # Close without saving changes 26 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($document) | Out-Null 27 | } 28 | Write-Host "All Word documents closed successfully" 29 | } 30 | elseif ($officeApp.Name -eq "Microsoft PowerPoint") { 31 | # PowerPoint - close all presentations 32 | for ($i = $officeApp.Presentations.Count; $i -ge 1; $i--) { 33 | $presentation = $officeApp.Presentations.Item($i) 34 | $presentation.Close() 35 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($presentation) | Out-Null 36 | } 37 | Write-Host "All PowerPoint presentations closed successfully" 38 | } 39 | elseif ($officeApp.Name -eq "Microsoft Access") { 40 | # For Access, there's typically one database open 41 | # Close any open database objects if needed 42 | Write-Host "Closed Access database" 43 | } 44 | else { 45 | Write-Host "Unknown Office application type. Unable to close documents specifically." 46 | } 47 | } catch { 48 | Write-Host "Warning: Could not close documents: $($_.Exception.Message)" 49 | } 50 | 51 | # Quit the application 52 | try { 53 | $officeApp.Quit() 54 | Write-Host "Application closed successfully" 55 | } catch { 56 | Write-Host "Warning: Could not quit application: $($_.Exception.Message)" 57 | } 58 | 59 | # Clean up COM objects safely 60 | try { 61 | if ($null -ne $officeApp -and $officeApp.GetType().IsCOMObject) { 62 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($officeApp) | Out-Null 63 | Write-Host "Released application COM object" 64 | } 65 | } catch { 66 | Write-Host "Warning: Error releasing application COM object: $($_.Exception.Message)" 67 | } 68 | 69 | # Force garbage collection to ensure COM objects are fully released 70 | [System.GC]::Collect() 71 | [System.GC]::WaitForPendingFinalizers() 72 | 73 | Write-Host "Clean-up completed successfully." 74 | } -------------------------------------------------------------------------------- /scripts/Enable-VBOM.ps1: -------------------------------------------------------------------------------- 1 | # Enable access to the VBA project object model and configure macro security settings 2 | 3 | function Enable-VBOM ($App) { 4 | Try { 5 | # Check if the application registry key exists 6 | $AppKeyPath = "Registry::HKEY_CLASSES_ROOT\$App.Application\CurVer" 7 | if (-not (Test-Path $AppKeyPath)) { 8 | Write-Output "Error: The registry path '$AppKeyPath' does not exist." 9 | return 10 | } 11 | 12 | # Retrieve the current version 13 | $CurVer = Get-ItemProperty -Path $AppKeyPath -ErrorAction Stop 14 | $Version = $CurVer.'(default)'.replace("$App.Application.", "") + ".0" 15 | 16 | # Define possible paths for AccessVBOM 17 | $Paths = @( 18 | "HKCU:\Software\Microsoft\Office\$Version\$App\Security", 19 | "HKLM:\Software\Microsoft\Office\$Version\$App\Security", 20 | "HKLM:\Software\WOW6432Node\Microsoft\Office\$Version\$App\Security", 21 | "HKCU:\Software\Microsoft\Office\$Version\Common\TrustCenter", 22 | "HKLM:\Software\Microsoft\Office\$Version\Common\TrustCenter" 23 | ) 24 | 25 | # Check each path 26 | $Found = $false 27 | foreach ($Path in $Paths) { 28 | if (Test-Path $Path) { 29 | Write-Output "Found registry path: $Path" 30 | # Set the AccessVBOM property 31 | Set-ItemProperty -Path $Path -Name AccessVBOM -Value 1 -ErrorAction Stop 32 | Write-Output "Successfully enabled AccessVBOM at $Path." 33 | $Found = $true 34 | } 35 | else { 36 | Write-Output "Registry path not found: $Path" 37 | } 38 | } 39 | 40 | if (-not $Found) { 41 | Write-Output "Error: None of the registry paths for AccessVBOM were found." 42 | } 43 | 44 | } Catch { 45 | Write-Output "Failed to enable access to VBA project object model for $App." 46 | Write-Output "Error: $($_.Exception.Message)" 47 | Write-Output "StackTrace: $($_.Exception.StackTrace)" 48 | } 49 | } 50 | 51 | function Enable-AllMacros ($App) { 52 | Try { 53 | # Check if the application registry key exists 54 | $AppKeyPath = "Registry::HKEY_CLASSES_ROOT\$App.Application\CurVer" 55 | if (-not (Test-Path $AppKeyPath)) { 56 | Write-Output "Error: The registry path '$AppKeyPath' does not exist." 57 | return 58 | } 59 | 60 | # Retrieve the current version 61 | $CurVer = Get-ItemProperty -Path $AppKeyPath -ErrorAction Stop 62 | $Version = $CurVer.'(default)'.replace("$App.Application.", "") + ".0" 63 | 64 | # Define possible security paths 65 | $SecurityPaths = @( 66 | "HKCU:\Software\Microsoft\Office\$Version\$App\Security", 67 | "HKLM:\Software\Microsoft\Office\$Version\$App\Security" 68 | ) 69 | 70 | # Check each path 71 | $Found = $false 72 | foreach ($Path in $SecurityPaths) { 73 | if (Test-Path $Path) { 74 | Write-Output "Found security registry path: $Path" 75 | # Set VBAWarnings to 1 (Enable all macros) 76 | Set-ItemProperty -Path $Path -Name VBAWarnings -Value 1 -ErrorAction Stop 77 | Write-Output "Successfully set macro security level to 'Enable all macros' at $Path." 78 | $Found = $true 79 | } 80 | else { 81 | Write-Output "Security registry path not found: $Path" 82 | } 83 | } 84 | 85 | if (-not $Found) { 86 | Write-Output "Error: None of the registry paths for macro security settings were found." 87 | } 88 | 89 | } Catch { 90 | Write-Output "Failed to modify macro security settings for $App." 91 | Write-Output "Error: $($_.Exception.Message)" 92 | Write-Output "StackTrace: $($_.Exception.StackTrace)" 93 | } 94 | } 95 | 96 | # Get the app name from the argument passed to the script 97 | $AppName = $args[0] 98 | 99 | if (-not $AppName) { 100 | Write-Output "Error: No application name specified. Usage: Enable-VBOM.ps1 " 101 | exit 1 102 | } 103 | 104 | Write-Output "Enabling VBOM access for $AppName..." 105 | Enable-VBOM $AppName 106 | 107 | Write-Output "Setting macro security to enable all macros for $AppName..." 108 | Enable-AllMacros $AppName -------------------------------------------------------------------------------- /scripts/Open-Close-Office.ps1: -------------------------------------------------------------------------------- 1 | # This script will list all the process that are part of the Office suite (and generic Office processes) and close them. 2 | # It will also check if the processes are running and close them if they are. 3 | 4 | # Define an array of Office-related process names 5 | $officeProcesses = @( 6 | "WINWORD", # Microsoft Word 7 | "EXCEL", # Microsoft Excel 8 | "POWERPNT", # Microsoft PowerPoint 9 | "OUTLOOK", # Microsoft Outlook 10 | "ONENOTE", # Microsoft OneNote 11 | "MSACCESS", # Microsoft Access 12 | "MSPUB", # Microsoft Publisher 13 | "TEAMS", # Microsoft Teams 14 | "lync", # Skype for Business 15 | "ONENOTEM", # OneNote quick notes 16 | "VISIO", # Microsoft Visio 17 | "OfficeClickToRun", # Office Click-to-Run 18 | "OfficeC2RClient" # Office Click-to-Run Client 19 | ) 20 | 21 | # Function to check and close Office processes 22 | function Close-OfficeProcesses { 23 | Write-Host "Checking for running Office processes..." -ForegroundColor Cyan 24 | 25 | $runningProcesses = Get-Process | Where-Object { $officeProcesses -contains $_.Name } 26 | 27 | if ($runningProcesses.Count -eq 0) { 28 | Write-Host "No Office processes are currently running." -ForegroundColor Green 29 | return 30 | } 31 | 32 | Write-Host "Found $($runningProcesses.Count) running Office processes:" -ForegroundColor Yellow 33 | foreach ($process in $runningProcesses) { 34 | Write-Host " - $($process.Name) (PID: $($process.Id))" -ForegroundColor Yellow 35 | } 36 | 37 | Write-Host "Closing Office processes..." -ForegroundColor Cyan 38 | foreach ($process in $runningProcesses) { 39 | try { 40 | $process | Stop-Process -Force -ErrorAction Stop 41 | Write-Host " Successfully closed $($process.Name)." -ForegroundColor Green 42 | } 43 | catch { 44 | Write-Host " Failed to close $($process.Name): $($_.Exception.Message)" -ForegroundColor Red 45 | } 46 | } 47 | 48 | # Wait for a moment to ensure processes are closed 49 | Start-Sleep -Seconds 15 50 | 51 | Write-Host "Re-checking for any remaining Office processes..." -ForegroundColor Cyan 52 | 53 | # Check if any processes remain running 54 | $remainingProcesses = Get-Process | Where-Object { $officeProcesses -contains $_.Name } 55 | if ($remainingProcesses.Count -gt 0) { 56 | Write-Host "`nWARNING: $($remainingProcesses.Count) Office processes could not be closed:" -ForegroundColor Red 57 | # Let's try a second time to close them 58 | foreach ($process in $remainingProcesses) { 59 | try { 60 | $process | Stop-Process -Force -ErrorAction Stop 61 | Write-Host " Successfully closed $($process.Name)." -ForegroundColor Green 62 | } 63 | catch { 64 | Write-Host " Failed to close $($process.Name): $($_.Exception.Message)" -ForegroundColor Red 65 | } 66 | } 67 | # Re-check for any remaining processes 68 | Start-Sleep -Seconds 15 69 | $remainingProcesses = Get-Process | Where-Object { $officeProcesses -contains $_.Name } 70 | if ($remainingProcesses.Count -eq 0) { 71 | Write-Host "All Office processes have been successfully closed." -ForegroundColor Green 72 | } 73 | else { 74 | Write-Host "Some Office processes are still running:" -ForegroundColor Red 75 | # List any remaining processes 76 | foreach ($process in $remainingProcesses) { 77 | Write-Host " - $($process.Name) (PID: $($process.Id))" -ForegroundColor Red 78 | } 79 | } 80 | 81 | } 82 | else { 83 | Write-Host "`nAll Office processes have been successfully closed." -ForegroundColor Green 84 | } 85 | } 86 | 87 | 88 | $officeApps = $args[0] 89 | if (-not $officeApps) { 90 | Write-Host "No Office applications specified. Exiting script." -ForegroundColor Red 91 | exit 1 92 | } 93 | 94 | # Convert the comma-separated string to an array 95 | $officeApps = $officeApps -split ',' | ForEach-Object { $_.Trim() } 96 | 97 | # Open each required Office application 98 | foreach ($app in $officeApps) { 99 | Write-Host "Opening $app application..." -ForegroundColor Cyan 100 | try { 101 | # Create a new COM object for the specified Office application 102 | $comObject = New-Object -ComObject "$app.Application" 103 | Write-Host "$app application opened successfully." -ForegroundColor Green 104 | $comObject = $null 105 | } 106 | catch { 107 | Write-Host "Failed to open $app application: $($_.Exception.Message)" -ForegroundColor Red 108 | } 109 | } 110 | 111 | # Wait for a moment to ensure processes are opened 112 | Start-Sleep -Seconds 5 113 | 114 | # Execute the function 115 | Close-OfficeProcesses -------------------------------------------------------------------------------- /scripts/Rename-It.ps1: -------------------------------------------------------------------------------- 1 | # This scripts simply copies the file from the source to the destination folder 2 | # and renames it to the correct file name based on the folder name. 3 | 4 | # Read the name of the folder from the argument passed to the script 5 | $folderName = $args[0] 6 | if (-not $folderName) { 7 | Write-Host "Error: No folder name specified. Usage: Rename-It.ps1 " 8 | exit 1 9 | } 10 | 11 | $ext = $args[1] 12 | if (-not $ext) { 13 | Write-Host "Error: No file extension specified. Usage: Rename-It.ps1 " 14 | exit 1 15 | } 16 | 17 | $sourceDir = $folderName.Substring(0, $folderName.LastIndexOf('/')) 18 | 19 | $filNameWithExtension = $folderName.Substring($folderName.LastIndexOf('/') + 1) 20 | $fileName = $filNameWithExtension.Substring(0, $filNameWithExtension.LastIndexOf('.')) 21 | $fileExtension = $filNameWithExtension.Substring($filNameWithExtension.LastIndexOf('.') + 1) 22 | 23 | # Since we can't create an .xlsb file from source code directly, we need to create a .xlsm file and then save it as .xlsb 24 | # We will use the xlsb.xlsm file extension in that case 25 | if ($fileExtension -eq "xlsb") { 26 | $fileExtension = "xlsb.xlsm" 27 | } 28 | 29 | # Since we can't edit the .ppam file directly, we will use the .pptm file extension 30 | if ($fileExtension -eq "ppam") { 31 | $fileExtension = "ppam.pptm" 32 | } 33 | 34 | # Create a copy of the zip/document file in the $folderName/Skeleton folder at the top level 35 | $copySource = "$folderName/Skeleton/$fileName.$ext" 36 | $renameDestinationFolder = "$sourceDir/out" 37 | $renameDestinationFilePath = "$renameDestinationFolder/$fileName.$fileExtension" 38 | 39 | # Create rename destination folder if it doesn't exist 40 | if (-not (Test-Path $renameDestinationFolder)) { 41 | Write-Host "Creating destination folder: $renameDestinationFolder" 42 | New-Item -ItemType Directory -Path $renameDestinationFolder -Force | Out-Null 43 | } 44 | 45 | # Delete the destination file if it exists 46 | if (Test-Path $renameDestinationFilePath) { 47 | Write-Host "Deleting existing file: $renameDestinationFilePath" 48 | Remove-Item -Path $renameDestinationFilePath -Force 49 | } 50 | 51 | # Copy and rename the file in one step 52 | Write-Host "Copying and renaming $copySource to $renameDestinationFilePath" 53 | Copy-Item -Path $copySource -Destination $renameDestinationFilePath -Force 54 | 55 | # Verify if the file exists after the copy 56 | if (-not (Test-Path $renameDestinationFilePath)) { 57 | Write-Host "Error: File not found after copy: $renameDestinationFilePath" 58 | exit 1 59 | } 60 | 61 | Write-Host "File successfully copied and renamed to: $renameDestinationFilePath" -------------------------------------------------------------------------------- /scripts/Tests-Rubberduck-VBA.ps1: -------------------------------------------------------------------------------- 1 | # Create a function for Rubberduck testing 2 | function Test-WithRubberduck { 3 | param ( 4 | [Parameter(Mandatory=$true)] 5 | $officeApp 6 | ) 7 | 8 | # Display the VBE to activate the Rubberduck COM add-in 9 | $officeApp.CommandBars.ExecuteMso("VisualBasic") 10 | 11 | # Wait for a moment to ensure the VBE is fully loaded 12 | Start-Sleep -Seconds 5 13 | 14 | $rubberduckAddin = $null 15 | $rubberduck = $null 16 | try { 17 | $rubberduckAddin = $officeApp.VBE.AddIns("Rubberduck.Extension") 18 | if ($null -eq $rubberduckAddin) { 19 | Write-Host "🔴 Error: Rubberduck add-in not found." 20 | return $false 21 | } 22 | Write-Host "Rubberduck add-in found." 23 | 24 | $rubberduck = $rubberduckAddin.Object 25 | if ($null -eq $rubberduck) { 26 | Write-Host "🔴 Error: Rubberduck object not found." 27 | return $false 28 | } 29 | Write-Host "Rubberduck object found." 30 | 31 | # Check if Rubberduck is actually ready 32 | try { 33 | $isConnected = $rubberduck.IsConnected 34 | Write-Host "Rubberduck connection status: $isConnected" 35 | if (-not $isConnected) { 36 | Write-Host "Waiting for Rubberduck to connect..." 37 | Start-Sleep -Seconds 5 # Give it more time to connect 38 | } 39 | } 40 | catch { 41 | Write-Host "⚠️ Warning: Unable to check Rubberduck connection status: $($_.Exception.Message)" 42 | # Let's try to refresh the object 43 | Start-Sleep -Seconds 3 44 | $rubberduck = $rubberduckAddin.Object 45 | } 46 | 47 | 48 | # Run all tests in the active VBA project 49 | $logPath = "${env:temp}\RubberduckTestLog.txt" 50 | $rubberduck.RunAllTestsAndGetResults($logPath) 51 | 52 | # Wait for tests to complete with a timeout of 3 minutes 53 | $timeout = New-TimeSpan -Minutes 3 54 | $stopwatch = [System.Diagnostics.Stopwatch]::StartNew() 55 | $testCompleted = $false 56 | 57 | Write-Host "Waiting for tests to complete (timeout: 3 minutes)..." 58 | while ($stopwatch.Elapsed -lt $timeout -and -not $testCompleted) { 59 | if (Test-Path $logPath) { 60 | $content = Get-Content -Path $logPath -ErrorAction SilentlyContinue 61 | if ($null -ne $content -and $content.Count -gt 0) { 62 | $testCompleted = $true 63 | Write-Host "Tests completed in $([math]::Round($stopwatch.Elapsed.TotalSeconds, 2)) seconds." 64 | break 65 | } 66 | } 67 | Start-Sleep -Seconds 2 68 | } 69 | 70 | $stopwatch.Stop() 71 | 72 | if (-not $testCompleted) { 73 | Write-Host "🔴 Error: Test execution timed out after 3 minutes." 74 | return $false 75 | } 76 | 77 | # Retrieve test results from the log file and display each line in the console 78 | # For each line if it starts with "Succeeded", add "✅" to the line, otherwise add "❌" 79 | if (Test-Path $logPath) { 80 | $results = Get-Content -Path $logPath 81 | Write-Host "Test results:" 82 | foreach ($line in $results) { 83 | if ($line -match "Succeeded") { 84 | Write-Host "✅ $line" 85 | } elseif ($line -match "🟡 No tests were run") { 86 | Write-Host "$line" 87 | } else { 88 | Write-Host "❌ $line" 89 | } 90 | } 91 | } else { 92 | Write-Host "🔴 Error: Log file not found." 93 | return $false 94 | } 95 | 96 | # Delete the log file after processing 97 | Remove-Item -Path $logPath -ErrorAction SilentlyContinue 98 | Write-Host "Log file deleted." 99 | 100 | # Make sure to release the COM object 101 | if ($null -ne $rubberduck) { 102 | [System.Runtime.Interopservices.Marshal]::ReleaseComObject($rubberduck) | Out-Null 103 | Write-Host "Released Rubberduck COM object" 104 | } 105 | 106 | return $true 107 | } 108 | catch { 109 | Write-Host "🔴 Error while using Rubberduck add-in on line $($_.InvocationInfo.ScriptLineNumber): $($_.Exception.Message)" 110 | return $false 111 | } 112 | } -------------------------------------------------------------------------------- /scripts/Zip-It.ps1: -------------------------------------------------------------------------------- 1 | # This script uses 7-Zip to compress files and folders in the ${folderName}/XMLsource directory into a zip file. 2 | 3 | # Read the name of the folder from the argument passed to the script 4 | $folderName = $args[0] 5 | if (-not $folderName) { 6 | Write-Host "Error: No folder name specified. Usage: Zip-It.ps1 " 7 | exit 1 8 | } 9 | 10 | $sourceDir = $folderName.Substring(0, $folderName.LastIndexOf('/')) 11 | 12 | $filNameWithExtension = $folderName.Substring($folderName.LastIndexOf('/') + 1) 13 | $fileName = $filNameWithExtension.Substring(0, $filNameWithExtension.LastIndexOf('.')) 14 | $fileExtension = $filNameWithExtension.Substring($filNameWithExtension.LastIndexOf('.') + 1) 15 | 16 | Write-Host "Staring the compression process..." 17 | 18 | $currentDir = Get-Location 19 | Write-Host "Current directory: $currentDir" 20 | 21 | # Define the source folder and the output zip file 22 | $sourceFolder = Join-Path -Path $currentDir -ChildPath "$folderName/XMLsource/" 23 | $outputZipFile = Join-Path -Path $currentDir -ChildPath "$folderName/Skeleton/$fileName.zip" 24 | 25 | # Path to the 7-Zip executable 26 | $sevenZipPath = "7z" # Assumes 7-Zip is in the system PATH. Adjust if necessary. 27 | 28 | # Check if the source folder exists 29 | if (-not (Test-Path $sourceFolder)) { 30 | Write-Host "Source folder not found: $sourceFolder" 31 | ls 32 | exit 1 33 | } 34 | 35 | # Ensure the destination directory exists 36 | $outputDir = Split-Path -Path $outputZipFile 37 | Write-Host "Output directory: $outputDir" 38 | 39 | if (-not (Test-Path $outputDir)) { 40 | Write-Host "Creating output directory: $outputDir" 41 | New-Item -ItemType Directory -Path $outputDir -Force | Out-Null 42 | } 43 | 44 | if (-not (Test-Path $sourceFolder)) { 45 | Write-Host "Source folder not found: $sourceFolder" 46 | exit 1 47 | } 48 | 49 | # Ensure the destination directory exists 50 | $outputDir = Split-Path -Path $outputZipFile 51 | if (-not (Test-Path $outputDir)) { 52 | Write-Host "Creating output directory: $outputDir" 53 | New-Item -ItemType Directory -Path $outputDir -Force | Out-Null 54 | } 55 | 56 | $absoluteSourceFolder = Resolve-Path -Path $sourceFolder 57 | if (-not (Test-Path $absoluteSourceFolder)) { 58 | Write-Host "Error: Source folder not found: $absoluteSourceFolder" 59 | exit 1 60 | } 61 | 62 | $absoluteDestinationFolder = Resolve-Path -Path $outputDir 63 | 64 | # Change the working directory to the source folder 65 | Write-Host "Changing directory to $absoluteSourceFolder..." 66 | cd $absoluteSourceFolder 67 | # if ($LASTEXITCODE -ne 0) { 68 | # Write-Host "Error: Failed to change directory to $absoluteSourceFolder" 69 | # exit $LASTEXITCODE 70 | # } 71 | 72 | Write-Host "Current directory after change: $(Get-Location)" 73 | 74 | # Compress the files and folders using 7-Zip 75 | Write-Host "Compressing files in $sourceFolder to $absoluteDestinationFolder..." 76 | & $sevenZipPath a -tzip "$absoluteDestinationFolder/$fileName.zip" "*" | Out-Null 77 | 78 | # Check if the compression was successful using $LASTEXITCODE 79 | if ($LASTEXITCODE -ne 0) { 80 | Write-Host "Error: Compression failed with exit code $LASTEXITCODE" 81 | exit $LASTEXITCODE 82 | } 83 | 84 | # Restore the original working directory 85 | Set-Location -Path $currentDir 86 | if ($LASTEXITCODE -ne 0) { 87 | Write-Host "Error: Failed to restore directory to $currentDir" 88 | exit $LASTEXITCODE 89 | } 90 | 91 | Write-Host "Compression completed successfully. Zip file created at: $absoluteDestinationFolder" 92 | -------------------------------------------------------------------------------- /scripts/utils/Minimize.ps1: -------------------------------------------------------------------------------- 1 | # This function should minimize the window using the Win32 API 2 | # It receives a string with the first part of the window title 3 | # and minimizes the window if it finds a match among the open windows 4 | function Minimize-Window { 5 | param ( 6 | [string]$windowTitlePart 7 | ) 8 | 9 | Write-Host "Starting window minimization process..." -ForegroundColor Cyan 10 | Write-Host "Looking for windows with title containing: '$windowTitlePart'" -ForegroundColor Cyan 11 | 12 | # Add the necessary Win32 API function 13 | Add-Type @" 14 | using System; 15 | using System.Runtime.InteropServices; 16 | public class Win32 { 17 | [DllImport("user32.dll")] 18 | [return: MarshalAs(UnmanagedType.Bool)] 19 | public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); 20 | } 21 | "@ 22 | 23 | # Get all open windows 24 | $windows = Get-Process | Where-Object { $_.MainWindowHandle -ne 0 } 25 | 26 | Write-Host "Found $($windows.Count) windows with valid handles" -ForegroundColor Gray 27 | 28 | $matchFound = $false 29 | 30 | foreach ($window in $windows) { 31 | Write-Verbose "Checking window: $($window.MainWindowTitle) (Handle: $($window.MainWindowHandle))" 32 | 33 | if ($window.MainWindowTitle -like "*$windowTitlePart*") { 34 | Write-Host "Match found! Window title: $($window.MainWindowTitle)" -ForegroundColor Green 35 | 36 | # Minimize the window 37 | try { 38 | # SW_MINIMIZE = 6 39 | [Win32]::ShowWindow($window.MainWindowHandle, 6) 40 | Write-Host "Successfully minimized window: $($window.MainWindowTitle)" -ForegroundColor Green 41 | $matchFound = $true 42 | } 43 | catch { 44 | Write-Host "Error minimizing window: $($_.Exception.Message)" -ForegroundColor Red 45 | } 46 | } 47 | } 48 | 49 | # If no match was found, return a list of all window handles 50 | if (-not $matchFound) { 51 | Write-Host "No windows found matching the pattern: '$windowTitlePart'" -ForegroundColor Yellow 52 | Write-Host "Here's a list of all available windows:" -ForegroundColor Yellow 53 | 54 | $windowList = $windows | ForEach-Object { 55 | [PSCustomObject]@{ 56 | Title = $_.MainWindowTitle 57 | Handle = $_.MainWindowHandle 58 | ProcessName = $_.ProcessName 59 | Id = $_.Id 60 | } 61 | } 62 | 63 | $windowList | Format-Table -AutoSize 64 | return $windowList 65 | } 66 | } -------------------------------------------------------------------------------- /scripts/utils/Path.ps1: -------------------------------------------------------------------------------- 1 | # Normalize the path by replacing backslashes with forward slashes 2 | function NormalizeFilePath { 3 | param ( 4 | [string]$path 5 | ) 6 | 7 | $normalizeFilePath = $path -replace '\\', '/' 8 | 9 | return $normalizeFilePath 10 | } 11 | 12 | # Normalize the path by replacing backslashes with forward slashes 13 | # and ensuring it ends with a slash 14 | function NormalizeDirPath { 15 | param ( 16 | [string]$path 17 | ) 18 | 19 | $normalizeFilePath = NormalizeFilePath($path) 20 | 21 | # Add a trailing slash if it doesn't exist 22 | if ($normalizeFilePath -notmatch '/$') { 23 | $normalizeFilePath += '/' 24 | } 25 | 26 | return $normalizeFilePath 27 | } 28 | 29 | function IsRelativePath { 30 | param ( 31 | [string]$path 32 | ) 33 | $path = NormalizeFilePath($path) 34 | return -not ($path -match '^[a-zA-Z]:/|^file://|^//') 35 | } 36 | 37 | function GetFileNameFromPath { 38 | param ( 39 | [string]$path 40 | ) 41 | $path = NormalizeFilePath($path) 42 | # If path has no "/", return the whole path since it might be a relative path from the current directory 43 | if ($path -notmatch '/') { 44 | return $path 45 | } 46 | return $path.Substring($path.LastIndexOf('/') + 1) 47 | } 48 | 49 | # Extract the file name without extension from the path 50 | function GetFileNameWithoutExtension { 51 | param ( 52 | [string]$path 53 | ) 54 | $path = NormalizeFilePath($path) 55 | $temp = GetFileNameFromPath($path) 56 | return $temp.Substring(0, $temp.LastIndexOf('.')) 57 | } 58 | 59 | function GetAbsPath { 60 | param ( 61 | [string]$path, 62 | [string]$basePath 63 | ) 64 | 65 | $path = NormalizeFilePath($path) 66 | $basePath = NormalizeDirPath($basePath) 67 | 68 | if (-not (IsRelativePath $path)) { 69 | return $path 70 | } 71 | 72 | # If path starts with a ., remove it 73 | if ($path.StartsWith('.')) { 74 | $path = $path.Substring(1) 75 | } 76 | 77 | # If path starts with a /, remove it 78 | if ($path.StartsWith('/')) { 79 | $path = $path.Substring(1) 80 | } 81 | 82 | return $basePath + $path 83 | 84 | # Alternative: 85 | # return (Resolve-Path $path).Path 86 | } 87 | 88 | function DirUp{ 89 | param ( 90 | [string]$path 91 | ) 92 | 93 | $path = NormalizeDirPath($path) 94 | $path = $path.TrimEnd('/') 95 | 96 | # Remove the last segment of the path 97 | $lastSlashIndex = $path.LastIndexOf('/') 98 | if ($lastSlashIndex -eq -1) { 99 | return '' 100 | } 101 | 102 | return $path.Substring(0, $lastSlashIndex) + '/' 103 | } 104 | 105 | function GetDirName { 106 | param ( 107 | [string]$path 108 | ) 109 | 110 | $path = NormalizeFilePath($path) 111 | 112 | if (IsRelativePath $path) { 113 | # If it stats with "/", add a "." to the beginning 114 | if ($path.StartsWith('/')) { 115 | $path = '.' + $path 116 | } 117 | $path = (Resolve-Path $path).Path 118 | } 119 | 120 | # Check if path is a file. If so, get the directory containing it 121 | if (Test-Path -Path $path -PathType Leaf) { 122 | # If it's a file, get the directory containing it 123 | $path = Split-Path -Parent $path 124 | } 125 | 126 | $path = NormalizeDirPath($path) 127 | $path = $path.TrimEnd('/') 128 | 129 | $DirName = $path.Substring($path.LastIndexOf('/') + 1) 130 | return $DirName 131 | } -------------------------------------------------------------------------------- /scripts/utils/Screenshot.ps1: -------------------------------------------------------------------------------- 1 | function Take-Screenshot { 2 | param ( 3 | [Parameter(Mandatory=$true)] 4 | [string]$OutputPath 5 | ) 6 | 7 | Add-Type -AssemblyName System.Windows.Forms 8 | Add-Type -AssemblyName System.Drawing 9 | 10 | # Get the screen dimensions 11 | $screen = [System.Windows.Forms.Screen]::PrimaryScreen 12 | $bounds = $screen.Bounds 13 | 14 | # Create a bitmap of the screen size 15 | $bitmap = New-Object System.Drawing.Bitmap $bounds.Width, $bounds.Height 16 | 17 | # Create a graphics object from the bitmap 18 | $graphic = [System.Drawing.Graphics]::FromImage($bitmap) 19 | 20 | # Copy the screen to the bitmap 21 | $graphic.CopyFromScreen($bounds.X, $bounds.Y, 0, 0, $bounds.Size) 22 | 23 | # Replace {{timestamp}} with the current date and time 24 | $timestamp = (Get-Date).ToString("yyyyMMdd_HHmmss") 25 | $OutputPath = $OutputPath -replace "{{timestamp}}", $timestamp 26 | 27 | # Save the bitmap as a file 28 | $bitmap.Save($OutputPath) 29 | 30 | # Dispose of the objects 31 | $graphic.Dispose() 32 | $bitmap.Dispose() 33 | 34 | Write-Host "Screenshot saved to: $OutputPath" 35 | } -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Class Modules/Class1.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "Class1" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = False 10 | '@Lang VBA 11 | Option Explicit 12 | 13 | 14 | Public Sub ExecuteWrite() 15 | Dim filePath As String 16 | Dim fileNum As Integer 17 | 18 | ' Specify the path to the text file 19 | filePath = ThisWorkbook.Path & "\ExcelAddin.txt" 20 | 21 | ' Get a free file number 22 | fileNum = FreeFile 23 | 24 | ' Open the file for output 25 | Open filePath For Output As #fileNum 26 | 27 | ' Write some text to the file 28 | Print #fileNum, "Hello, World!" 29 | 30 | ' Close the file 31 | Close #fileNum 32 | End Sub -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Microsoft Excel Objects/Sheet1.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "Sheet1" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = True 10 | Option Explicit 11 | 12 | Sub Test() 13 | Debug.Print "test" 14 | End Sub 15 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Microsoft Excel Objects/ThisWorkbook.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "ThisWorkbook" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = True 10 | Option Explicit 11 | 12 | Sub WriteToImmediateWindow() 13 | Debug.Print "test" 14 | End Sub 15 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Modules/FunctionCollection.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "FunctionCollection" 2 | Option Explicit 3 | 4 | 'Source: https://www.youtube.com/watch?v=sR8ZM0XUXdk 5 | 6 | '@Description("This will make a valid constant name according to convention") 7 | '@Dependency("IsCapitalLetter function") 8 | '@ExampleCall : MakeValidConstName("SettingsTable") >> SETTINGS_TABLE 9 | '@Date : 14 October 2021 08:05:41 PM 10 | Public Function MakeValidConstName(ByVal GivenName As String) As String 11 | 12 | If Trim(GivenName) = vbNullString Then 13 | Err.Raise 13, "MakeValidConstName Function", "Constant Name can't be Nullstring" 14 | ElseIf Not (Left(GivenName, 1) Like "[A-Za-z]") Then 15 | Err.Raise 13, "MakeValidConstName Function", "Constant Name Should be start with A-Z or a-z" 16 | End If 17 | 18 | Dim Result As String 19 | If UCase(GivenName) = GivenName Then 20 | MakeValidConstName = GivenName 21 | Exit Function 22 | End If 23 | Dim Counter As Long 24 | Dim CurrentCharacter As String 25 | Const WORD_SEPARATOR As String = "_" 26 | Result = Left(GivenName, 1) 27 | For Counter = 2 To Len(GivenName) 28 | CurrentCharacter = Mid(GivenName, Counter, 1) 29 | If IsCapitalLetter(CurrentCharacter) Then 30 | Result = Result & WORD_SEPARATOR 31 | End If 32 | Result = Result & CurrentCharacter 33 | Next Counter 34 | Result = UCase(Result) 35 | MakeValidConstName = Result 36 | 37 | End Function 38 | 39 | 40 | '@Description("This will check if a given character is Capital letter > A-Z..It will throw error if length of the letter is more than 1") 41 | '@Dependency("No Dependency") 42 | '@ExampleCall : IsCapitalLetter(CurrentCharacter) 43 | '@Date : 14 October 2021 10:23:19 PM 44 | Public Function IsCapitalLetter(ByVal GivenLetter As String) As Boolean 45 | If Len(GivenLetter) > 1 Then 46 | Err.Raise 13, "IsCapitalLetter Function", "Given Letter need to be one character String" 47 | End If 48 | If GivenLetter = vbNullString Then 49 | Err.Raise 5, "IsCapitalLetter Function", "Given Letter can't be nullstring" 50 | End If 51 | 52 | Const ASCII_CODE_FOR_A As Integer = 65 53 | Const ASCII_CODE_FOR_Z As Integer = 90 54 | Dim ASCIICodeForGivenLetter As Integer 55 | ASCIICodeForGivenLetter = Asc(GivenLetter) 56 | IsCapitalLetter = (ASCIICodeForGivenLetter >= ASCII_CODE_FOR_A And ASCIICodeForGivenLetter <= ASCII_CODE_FOR_Z) 57 | 58 | End Function 59 | 60 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Sub WriteToFile() 12 | Class1.ExecuteWrite 13 | End Sub -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Modules/RunTests.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "RunTests" 2 | 3 | Sub RunAllTests() 4 | Dim Output As String 5 | With Application.VBE.AddIns("Rubberduck.Extension").Object 6 | Dim LogPath As String 7 | LogPath = ThisWorkbook.Path & "\RD_Log_" & ThisWorkbook.Name & ".txt" 8 | Output = .RunAllTestsAndGetResults(LogPath) 9 | End With 10 | ' Output the result to the Immediate Window 11 | Debug.Print Output 12 | End Sub -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/Modules/TestsForIsCapitalLetterFunction.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "TestsForIsCapitalLetterFunction" 2 | Option Explicit 3 | Option Private Module 4 | 5 | '@TestModule 6 | '@Folder("Tests") 7 | 8 | Private Assert As Rubberduck.AssertClass 9 | Private Fakes As Rubberduck.FakesProvider 10 | 11 | '@ModuleInitialize >>BeforeAll 12 | Private Sub ModuleInitialize() 13 | 'this method runs once per module. 14 | Set Assert = New Rubberduck.AssertClass 15 | Set Fakes = New Rubberduck.FakesProvider 16 | End Sub 17 | 18 | '@ModuleCleanup >>AfterAll 19 | Private Sub ModuleCleanup() 20 | 'this method runs once per module. 21 | Set Assert = Nothing 22 | Set Fakes = Nothing 23 | End Sub 24 | 25 | '@TestInitialize >> BeforeEach 26 | Private Sub TestInitialize() 27 | 'This method runs before every test in the module.. 28 | End Sub 29 | 30 | '@TestCleanup >>AfterEach 31 | Private Sub TestCleanup() 32 | 'this method runs after every test in the module. 33 | End Sub 34 | 35 | '@TestMethod("IsCapitalLetter Function Test >>Capital Letter Case") 36 | Private Sub IsCapitalLetterForCapitalLetterCase() 37 | On Error GoTo TestFail 38 | Dim Actual As Boolean 39 | Actual = FunctionCollection.IsCapitalLetter("A") 40 | Assert.IsTrue Actual, "This Test should return True" 41 | TestExit: 42 | Exit Sub 43 | TestFail: 44 | Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description 45 | Resume TestExit 46 | End Sub 47 | 48 | '@TestMethod("IsCapitalLetter Function Test>> Small Letter Case") 49 | Private Sub IsCapitalLetterForSmallerLetterCase() 50 | On Error GoTo TestFail 51 | Dim Actual As Boolean 52 | Actual = FunctionCollection.IsCapitalLetter("a") 53 | Assert.IsFalse Actual, "This Test should return false" 54 | TestExit: 55 | Exit Sub 56 | TestFail: 57 | Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description 58 | Resume TestExit 59 | End Sub 60 | 61 | '@TestMethod("IsCapitalLetter Function Test>> Digit Case") 62 | Private Sub IsCapitalLetterForDigitCase() 63 | On Error GoTo TestFail 64 | Dim Actual As Boolean 65 | Actual = FunctionCollection.IsCapitalLetter("8") 66 | Assert.IsFalse Actual, "This Test should return false" 67 | TestExit: 68 | Exit Sub 69 | TestFail: 70 | Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description 71 | Resume TestExit 72 | End Sub 73 | 74 | 75 | '@TestMethod("IsCapitalLetter Function Test>> Error Raising Case") 76 | Private Sub IsCapitalLetterForErrorCase() 77 | Const ExpectedError As Long = 13 78 | On Error GoTo TestFail 79 | Dim Actual As Boolean 80 | Actual = FunctionCollection.IsCapitalLetter("ISMAIL") 81 | Assert.IsFalse Actual, "This Test should return false" 82 | 83 | Assert: 84 | Assert.Fail "Expected error was not raised" 85 | 86 | TestExit: 87 | Exit Sub 88 | TestFail: 89 | If Err.Number = ExpectedError Then 90 | Resume TestExit 91 | Else 92 | Resume Assert 93 | End If 94 | End Sub 95 | 96 | '@TestMethod("IsCapitalLetter Function Test>> NullString Case") 97 | Private Sub IsCapitalLetterForNullStringCase() 98 | Const ExpectedError As Long = 5 99 | On Error GoTo TestFail 100 | Dim Actual As Boolean 101 | Actual = FunctionCollection.IsCapitalLetter(vbNullString) 102 | Assert.IsFalse Actual, "This Test should return false" 103 | 104 | Assert: 105 | Assert.Fail "Expected error was not raised" 106 | 107 | TestExit: 108 | Exit Sub 109 | TestFail: 110 | If Err.Number = ExpectedError Then 111 | Resume TestExit 112 | Else 113 | Resume Assert 114 | End If 115 | End Sub -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/_rels/.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/docProps/app.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Microsoft Excel 4 | 0 5 | false 6 | 7 | 8 | 9 | Worksheets 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | 18 | Sheet1 19 | 20 | 21 | 22 | 23 | false 24 | false 25 | false 26 | 16.0300 27 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/docProps/core.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Martin Leduc 4 | Martin Leduc 5 | 2025-03-28T01:46:34Z 6 | 2025-04-18T21:43:31Z 7 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/xl/_rels/workbook.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/xl/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/xl/workbook.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/ExcelAddin.xlam/XMLsource/xl/worksheets/sheet1.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Sub WriteToFile() 12 | Dim filePath As String 13 | Dim fileNum As Integer 14 | 15 | ' Specify the path to the text file 16 | filePath = ThisWorkbook.Path & "\ExcelBinaryWorkbook.txt" 17 | 18 | ' Get a free file number 19 | fileNum = FreeFile 20 | 21 | ' Open the file for output 22 | Open filePath For Output As #fileNum 23 | 24 | ' Write some text to the file 25 | Print #fileNum, "Hello, World!" 26 | 27 | ' Close the file 28 | Close #fileNum 29 | End Sub -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/_rels/.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/docProps/app.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Microsoft Excel 4 | 0 5 | false 6 | 7 | 8 | 9 | Worksheets 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | 18 | Sheet1 19 | 20 | 21 | 22 | 23 | false 24 | false 25 | false 26 | 16.0300 27 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/docProps/core.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Martin Leduc 4 | Martin Leduc 5 | 2025-03-28T01:46:34Z 6 | 2025-03-28T02:02:50Z 7 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/xl/_rels/workbook.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/xl/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/xl/workbook.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/ExcelBinaryWorkbook.xlsb/XMLsource/xl/worksheets/sheet1.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/Microsoft Excel Objects/Sheet1.sheet.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "Sheet1" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = True 10 | Option Explicit 11 | 12 | Sub Test() 13 | Debug.Print "test" 14 | End Sub 15 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/Microsoft Excel Objects/ThisWorkbook.wbk.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "ThisWorkbook" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = True 10 | Option Explicit 11 | 12 | Sub WriteToImmediateWindow() 13 | Debug.Print "test" 14 | End Sub 15 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Sub WriteToFile() 12 | Dim filePath As String 13 | Dim fileNum As Integer 14 | 15 | ' Specify the path to the text file 16 | filePath = ThisWorkbook.Path & "\ExcelWorkbook.txt" 17 | 18 | ' Get a free file number 19 | fileNum = FreeFile 20 | 21 | ' Open the file for output 22 | Open filePath For Output As #fileNum 23 | 24 | ' Write some text to the file 25 | Print #fileNum, "Hello, World!" 26 | 27 | ' Close the file 28 | Close #fileNum 29 | End Sub -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/_rels/.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/docProps/app.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Microsoft Excel 4 | 0 5 | false 6 | 7 | 8 | 9 | Worksheets 10 | 11 | 12 | 1 13 | 14 | 15 | 16 | 17 | 18 | Sheet1 19 | 20 | 21 | 22 | 23 | false 24 | false 25 | false 26 | 16.0300 27 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/docProps/core.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Martin Leduc 4 | Martin Leduc 5 | 2025-03-28T01:46:34Z 6 | 2025-03-28T02:02:50Z 7 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/xl/_rels/workbook.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/xl/styles.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/xl/workbook.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/ExcelWorkbook.xlsm/XMLsource/xl/worksheets/sheet1.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Sub WriteToFile() 12 | Dim filePath As String 13 | Dim fileNum As Integer 14 | 15 | ' Specify the path to the text file 16 | filePath = ThisAddin.Path & "\PowerPointAddin.txt" 17 | 18 | ' Get a free file number 19 | fileNum = FreeFile 20 | 21 | ' Open the file for output 22 | Open filePath For Output As #fileNum 23 | 24 | ' Write some text to the file 25 | Print #fileNum, "Hello, World!" 26 | 27 | ' Close the file 28 | Close #fileNum 29 | End Sub 30 | 31 | Private Function ThisAddin() As PowerPoint.Addin 32 | ' This function returns the current Addin object 33 | ' It is used to access the Addin's properties and methods 34 | Dim addin As PowerPoint.Addin 35 | 36 | For Each addin In Application.AddIns 37 | If addin.Name = "PowerPointAddin" Then 38 | Set ThisAddin = addin 39 | Exit Function 40 | End If 41 | Next addin 42 | ' If the addin is not found, return Nothing 43 | Set ThisAddin = Nothing 44 | Exit Function 45 | 46 | End Function -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/_rels/.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/docProps/app.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 2 4 | 0 5 | Microsoft Office PowerPoint 6 | Widescreen 7 | 0 8 | 1 9 | 0 10 | 0 11 | 0 12 | false 13 | 14 | 15 | 16 | Fonts Used 17 | 18 | 19 | 3 20 | 21 | 22 | Theme 23 | 24 | 25 | 1 26 | 27 | 28 | Slide Titles 29 | 30 | 31 | 1 32 | 33 | 34 | 35 | 36 | 37 | Aptos 38 | Aptos Display 39 | Arial 40 | Office Theme 41 | PowerPoint Presentation 42 | 43 | 44 | 45 | 46 | false 47 | false 48 | false 49 | 16.0000 50 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/docProps/core.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Martin Leduc 6 | Martin Leduc 7 | 1 8 | 2025-04-19T01:26:16Z 9 | 2025-04-19T01:28:20Z 10 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/docProps/thumbnail.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DecimalTurn/VBA-Build/578bed902f441bdda9c40e70863e43953ad46fbd/tests/PowerPointAddin.ppam/XMLsource/docProps/thumbnail.jpeg -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/_rels/presentation.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/presProps.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/presentation.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout1.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout10.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout11.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout2.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout3.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout4.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout5.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout6.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout7.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout8.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/_rels/slideLayout9.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/slideLayout10.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Click to edit Master title style 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Click to edit Master text styles 72 | 73 | 74 | 75 | 76 | 77 | 78 | Second level 79 | 80 | 81 | 82 | 83 | 84 | 85 | Third level 86 | 87 | 88 | 89 | 90 | 91 | 92 | Fourth level 93 | 94 | 95 | 96 | 97 | 98 | 99 | Fifth level 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 2025-04-18 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | ‹#› 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/slideLayout2.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Click to edit Master title style 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Click to edit Master text styles 72 | 73 | 74 | 75 | 76 | 77 | 78 | Second level 79 | 80 | 81 | 82 | 83 | 84 | 85 | Third level 86 | 87 | 88 | 89 | 90 | 91 | 92 | Fourth level 93 | 94 | 95 | 96 | 97 | 98 | 99 | Fifth level 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 2025-04-18 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | ‹#› 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/slideLayout6.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Click to edit Master title style 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 2025-04-18 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | ‹#› 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideLayouts/slideLayout7.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 2025-04-18 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | ‹#› 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slideMasters/_rels/slideMaster1.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slides/_rels/slide1.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/slides/slide1.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/tableStyles.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /tests/PowerPointAddin.ppam/XMLsource/ppt/viewProps.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Sub WriteToFile() 12 | Dim filePath As String 13 | Dim fileNum As Integer 14 | 15 | ' Specify the path to the text file 16 | filePath = ThisPresentation.Path & "\PowerPointPresentation.txt" 17 | 18 | ' Get a free file number 19 | fileNum = FreeFile 20 | 21 | ' Open the file for output 22 | Open filePath For Output As #fileNum 23 | 24 | ' Write some text to the file 25 | Print #fileNum, "Hello, World!" 26 | 27 | ' Close the file 28 | Close #fileNum 29 | End Sub 30 | 31 | Private Function ThisPresentation() As PowerPoint.Presentation 32 | Dim Pres As Presentation 33 | On Error Resume Next 34 | Set Pres = Presentations("PowerPointPresentation.pptm") 35 | On Error GoTo 0 36 | If Pres Is Nothing Then 37 | 'Try to fallback using ActiveVBProject 38 | Dim PresName As String 39 | PresName = Split(Application.VBE.ActiveVBProject.FileName, "\")(UBound(Split(Application.VBE.ActiveVBProject.FileName, "\"))) 40 | Set Pres = Presentations(PresName) 41 | End If 42 | Set ThisPresentation = Pres 43 | Exit Function 44 | End Function -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/_rels/.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/docProps/app.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 2 4 | 0 5 | Microsoft Office PowerPoint 6 | Widescreen 7 | 0 8 | 1 9 | 0 10 | 0 11 | 0 12 | false 13 | 14 | 15 | 16 | Fonts Used 17 | 18 | 19 | 3 20 | 21 | 22 | Theme 23 | 24 | 25 | 1 26 | 27 | 28 | Slide Titles 29 | 30 | 31 | 1 32 | 33 | 34 | 35 | 36 | 37 | Aptos 38 | Aptos Display 39 | Arial 40 | Office Theme 41 | PowerPoint Presentation 42 | 43 | 44 | 45 | 46 | false 47 | false 48 | false 49 | 16.0000 50 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/docProps/core.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Martin Leduc 6 | Martin Leduc 7 | 1 8 | 2025-04-19T01:26:16Z 9 | 2025-04-19T01:28:20Z 10 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/docProps/thumbnail.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DecimalTurn/VBA-Build/578bed902f441bdda9c40e70863e43953ad46fbd/tests/PowerPointPresentation.pptm/XMLsource/docProps/thumbnail.jpeg -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/_rels/presentation.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/presProps.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/presentation.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout1.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout10.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout11.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout2.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout3.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout4.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout5.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout6.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout7.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout8.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/_rels/slideLayout9.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/slideLayout10.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Click to edit Master title style 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Click to edit Master text styles 72 | 73 | 74 | 75 | 76 | 77 | 78 | Second level 79 | 80 | 81 | 82 | 83 | 84 | 85 | Third level 86 | 87 | 88 | 89 | 90 | 91 | 92 | Fourth level 93 | 94 | 95 | 96 | 97 | 98 | 99 | Fifth level 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 2025-04-18 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | ‹#› 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/slideLayout2.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Click to edit Master title style 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Click to edit Master text styles 72 | 73 | 74 | 75 | 76 | 77 | 78 | Second level 79 | 80 | 81 | 82 | 83 | 84 | 85 | Third level 86 | 87 | 88 | 89 | 90 | 91 | 92 | Fourth level 93 | 94 | 95 | 96 | 97 | 98 | 99 | Fifth level 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 2025-04-18 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | ‹#› 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/slideLayout6.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Click to edit Master title style 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 2025-04-18 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | ‹#› 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideLayouts/slideLayout7.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 2025-04-18 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | ‹#› 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slideMasters/_rels/slideMaster1.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slides/_rels/slide1.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/slides/slide1.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/tableStyles.xml: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /tests/PowerPointPresentation.pptm/XMLsource/ppt/viewProps.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/Class Modules/Class1.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "Class1" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = False 10 | '@Lang VBA 11 | Option Explicit 12 | 13 | 14 | Public Sub ExecuteWrite() 15 | Dim filePath As String 16 | Dim fileNum As Integer 17 | 18 | ' Specify the path to the text file 19 | filePath = ThisDocument.Path & "\WordDocument.txt" 20 | 21 | ' Get a free file number 22 | fileNum = FreeFile 23 | 24 | ' Open the file for output 25 | Open filePath For Output As #fileNum 26 | 27 | ' Write some text to the file 28 | Print #fileNum, "Hello, World!" 29 | 30 | ' Close the file 31 | Close #fileNum 32 | End Sub -------------------------------------------------------------------------------- /tests/WordDocument.docm/Microsoft Word Objects/ThisDocument.doc.cls: -------------------------------------------------------------------------------- 1 | VERSION 1.0 CLASS 2 | BEGIN 3 | MultiUse = -1 'True 4 | END 5 | Attribute VB_Name = "ThisDocument" 6 | Attribute VB_GlobalNameSpace = False 7 | Attribute VB_Creatable = False 8 | Attribute VB_PredeclaredId = True 9 | Attribute VB_Exposed = True 10 | Option Explicit 11 | 12 | Sub Test() 13 | Debug.Print "test" 14 | End Sub 15 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/Modules/Module1.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Module1" 2 | 3 | '@Lang VBA 4 | Option Explicit 5 | 6 | Sub Demo() 7 | MsgBox "Hello, World!" 8 | End Sub 9 | 10 | 'This code will be called via COM to test if the VBA import was successful 11 | Public Sub WriteToFile() 12 | Class1.ExecuteWrite 13 | End Sub -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/[Content_Types].xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/_rels/.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/docProps/app.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 0 5 | 1 6 | 0 7 | 0 8 | Microsoft Office Word 9 | 0 10 | 0 11 | 0 12 | false 13 | 14 | 15 | false 16 | 0 17 | false 18 | false 19 | 16.0000 20 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/docProps/core.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Martin Leduc 8 | 9 | 10 | 11 | 12 | Martin Leduc 13 | 2 14 | 2025-04-18T23:46:00Z 15 | 2025-04-18T23:46:00Z 16 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/word/_rels/document.xml.rels: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/word/document.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/word/fontTable.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/word/settings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /tests/WordDocument.docm/XMLsource/word/webSettings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | --------------------------------------------------------------------------------