---
id: change/bcapps/12772
type: change
title: "#12772 Bug 654042: [DocumentReporting] Exporting Word layout themes uses the wrong file extension"
summary: Word theme layouts are now exported with the dotx file extension instead of docx. GetFileExtension in Report Layouts Impl. now handles Word layout subtypes, and the PR adds the missing tests for the artifact export functions.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - codeunit report layouts impl.
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-11-20T00:57:46.522Z"
  flags: []
generated:
  at: "2026-12-04T00:17:10.168Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 30062f0817ae6075712fe98e4cdfa006f39e086c
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/12772
    title: "microsoft/BCApps#12772: Bug 654042: [DocumentReporting] Exporting Word layout themes uses the wrong file extension"
    date: "2026-11-17"
    commit: 30062f0817ae6075712fe98e4cdfa006f39e086c
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/9660
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-report-layout-declaration
      title: Define Report Layouts in AL for Business Central
      label: possibly related
      why: Documents defining report layouts in AL including Word layout themes that the fix addresses.
      by: model
number: 12772
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/12772
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-17T14:56:55Z"
author: nhsejth
author_type: User
community_contribution: false
labels:
  - "Team: Integrations"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 9
  additions: 1103
  deletions: 133
  al: 1
apps:
  - Base Application
objects_touched:
  - key: codeunit/9660
    page: codeunit/9660
    type: codeunit
    id: 9660
    name: Report Layouts Impl.
    app: Base Application
    status: modified
objects_unjoined: []
obsoletions: []
backports:
  - number: 14333
    base: releases/29.x
    url: https://github.com/microsoft/BCApps/pull/14333
fixes_issues: []
work_items:
  - 654042
systems:
  - platform
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #12772 Bug 654042: [DocumentReporting] Exporting Word layout themes uses the wrong file extension

> Word theme layouts are now exported with the dotx file extension instead of docx. GetFileExtension in Report Layouts Impl. now handles Word layout subtypes, and the PR adds the missing tests for the artifact export functions.

[Pull request](https://github.com/microsoft/BCApps/pull/12772) · merged into `main` (BC30) on 2026-11-17 by nhsejth · 9 files (+1103 -133), 1 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- GetFileExtension in codeunit 9660 now handles Word layout subtypes
- Theme layouts are exported as dotx instead of docx
- Adds tests for the layout export functions in the composite layout and report layout test codeunits
- Adds sample docx, xlsx and dotx layout files and extends the test report
- Behaviour changes for users or extensions.

## AL objects touched

- [Codeunit 9660 "Report Layouts Impl."](../../objects/codeunit/9660.md), Base Application: modified

## Also merged into

- [#14333](https://github.com/microsoft/BCApps/pull/14333) into `releases/29.x` on 2026-12-03

## Context

- Work items: AB#654042
- Labels: Team: Integrations
- Systems: platform

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Define Report Layouts in AL for Business Central](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-report-layout-declaration) — possibly related: Documents defining report layouts in AL including Word layout themes that the fix addresses. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
