---
title: "Codeunit 5054 WordManagement"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5054-wordmanagement/
type: codeunit
id: 5054
name: "WordManagement"
app: "Base Application"
versions: "17-21"
build: 21.5.53619.63803
obsolete: "Pending 19.0"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5054 WordManagement

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5054-wordmanagement/

| | |
| --- | --- |
| App | Base Application |
| Versions | 17-21 |
| Obsolete | Pending 19.0, seen from 18. Word DotNet libraries do not work in any of the supported clients. The functionality is replaced with Word Template Interactions codeunit. |
| Source file | WordManagement.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| Activate | (var Codeunit WordApplicationHandler, Integer) | - | public | 17-21 | - | - |
| IsActive | () | Boolean | public | 17-21 | - | - |
| Deactivate | (Integer) | - | public | 17-21 | - | - |
| TryGetWord | (var DotNet ApplicationClass) | Boolean | public | 17-19 | Pending 17.3 | Procedures that call this procedure are being removed as they use RunOnClient DotNet which does not function on non-Windows client types. |
| CreateWordAttachment | (Text[260], Code[10]) | Integer | public | 17-19 | Pending 17.3 | Procedure uses .NET which do not function on non-Windows client types. |
| OpenWordAttachment | (var Record Attachment, Text, Text[260], Boolean, Code[10]) | - | public | 17-19 | Pending 17.3 | Procedure uses .NET which do not function on non-Windows client types. |
| Merge | (var Record Delivery Sorter) | - | public | 17-19 | Pending 17.3 | Procedure uses .NET which do not function on non-Windows client types. |
| ShowMergedDocument | (var Record Segment Line, var Record Attachment, Text[260], Boolean) | - | public | 17-19 | Pending 17.3 | Procedure uses .NET which do not function on non-Windows client types. |
| CreateHeader | (var DotNet MergeHandler, Boolean, Text, Code[10]) | Integer | public | 17-19 | Pending 17.3 | Procedures that call this local procedure are being removed as they use .NET which do not function on non-Windows client types. |
| PopulateInterLogEntryToMergeSource | (var File, var Record Attachment, Integer, var Boolean, Option) | - | public | 17-21 | - | - |
| AddFieldsToMergeSource | (var DotNet MergeHandler, var Record Interaction Log Entry, var Record Segment Line, Text, Integer) | - | public | 17-21 | - | - |
| GetWordDocumentExtension | (Text[30]) | Code[4] | public | 17-21 | - | - |
| IsWordDocumentExtension | (Text) | Boolean | public | 17-21 | - | - |
| RunMergedDocument | (var Record Segment Line, var Record Attachment, Text[260], Boolean, Boolean, Boolean) | - | public | 17-19 | Pending 17.3 | Procedure uses .NET which do not function on non-Windows client types. |
| CanRunWordApp | () | Boolean | public | 17-21 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAddFieldsToMergeSource | (var Record Name/Value Buffer, Record Salesperson/Purchaser, Record Country/Region, Record Contact, Record Company Information, Record Segment Line, Record Interaction Log Entry) | 17-21 | - | - |
| Integration event | OnAddMultilineFieldDataOnBeforeFormatContactAddr | (var Text[100], Record Contact, Code[10], Date, var Boolean) | 17-21 | - | - |
| Integration event | OnCreateHeaderAddFields | (var Record Name/Value Buffer, Record Salesperson/Purchaser, Record Country/Region, Record Contact, Record Company Information, Record Segment Line, Record Interaction Log Entry) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnBeforeAddFieldsToMergeSource | (var Record Segment Line, var Record Delivery Sorter) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnBeforeCheckCanRunWord | (var Boolean, var Boolean) | 17-21 | - | - |
| Integration event | OnBeforeDeleteFile | (Text, var Boolean, var Boolean) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnBeforeInitMergeFields | (var Record Interaction Log Entry, var Record Segment Line) | 17-21 | - | - |
| Integration event | OnFindActiveSubscriber | (var Boolean) | 17-21 | - | - |
| Integration event | OnGetWord | (var DotNet ApplicationClass, var Boolean) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnDeactivate | (Integer) | 17-21 | - | - |
| Integration event | OnExecuteMergeFaxMailToValueCaseElse | (var Record Delivery Sorter, var Text) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnExecuteMergeWordDocumentCaseElse | (var Record Delivery Sorter) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnHandleWordDocumentWithoutMergeCorrespondenceTypeCaseElse | (var Record Interaction Log Entry, var Record Delivery Sorter) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |
| Integration event | OnSendAttachmentWithoutMergeFieldsCorrespondenceTypeCaseElse | (var Record Attachment, var Record Delivery Sorter) | 17-19 | Pending 17.3 | Procedures that trigger this event are obsolete and will be removed. |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.

Jonas Paprotka, 2026-09-20.
