---
id: post/yzhums-com/63559
type: post
title: "Dynamics 365 Business Central: Save a document as a Word attachment (Attach as Word) – Customization"
summary: This customization demonstrates two approaches to save Business Central documents as Word attachments instead of PDF files. It shows how to modify the Attach as PDF action's behavior using event subscribers or create a new Attach as Word action with custom logic.
tier: community
language: en
tags:
  - document attachment
  - report customization
  - word format
  - page extension
  - event subscriber
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:42:40.324Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: c2cf7d2be8ef8d365bc623a44dc3da92e42c4304df7f03bc1727f36d6d345cd5
evidence:
  - kind: blog
    url: https://yzhums.com/63559/
    title: "Dynamics 365 Business Central: Save a document as a Word attachment (Attach as Word) – Customization"
    date: "2025-05-09"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "63559"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/63559/
published_at: "2025-05-09T01:16:48.000Z"
author: Yun Zhu
full_text: false
words: 764
quotes: []
code_objects_mentioned:
  - codeunit SaveAsWordHandler
  - page PostedSalesInvoicesExt
systems:
  - sales
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2025/05/Snipaste_2025-05-09_10-02-20.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:20:49.681Z"
---

# Dynamics 365 Business Central: Save a document as a Word attachment (Attach as Word) – Customization

[Read the post](https://yzhums.com/63559/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2025-05-09 · 764 words · tier community · reviewed (checked by Opus)

> This customization demonstrates two approaches to save Business Central documents as Word attachments instead of PDF files. It shows how to modify the Attach as PDF action's behavior using event subscribers or create a new Attach as Word action with custom logic.

## Key points

- The standard Attach as PDF action saves documents as PDF files to the document attachments FactBox
- Customization requires changing the report output format to Word and renaming the file extension to .docx
- Event subscribers can hook into OnBeforeSaveReportAsPDF (Report Selections table) and OnBeforeSaveAttachment (Document Attachment table) to modify the standard behavior
- A page extension approach creates a new action without modifying standard logic, using Report.SaveAs with ReportFormat::Word parameter

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- codeunit "SaveAsWordHandler"
- page "PostedSalesInvoicesExt"

Not found in BC28-30: codeunit "SaveAsWordHandler", page "PostedSalesInvoicesExt".

## Context

- Features: Attach as Word action, Document attachments, Report format conversion, Posted Sales Invoices customization, Custom layout reporting

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
