{
  "title": "Codeunit 5054 WordManagement",
  "url": "https://jonas-paprotka.de/ref/codeunit/5054-wordmanagement/",
  "author": "Jonas Paprotka",
  "license": "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link.",
  "subject": "Microsoft Dynamics 365 Business Central",
  "checked": "2026-09-20",
  "source": {
    "feed": "https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json",
    "package": "Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972",
    "build": "21.5.53619.63803",
    "code": {},
    "note": "Presence per major, highest build of each; 17 is the oldest major on the feed. Local procedures are not listed."
  },
  "object": {
    "type": "codeunit",
    "id": 5054,
    "name": "WordManagement",
    "app": "Base Application",
    "appByVersion": [
      {
        "app": "Base Application",
        "from": 17
      }
    ],
    "nameByVersion": [
      {
        "name": "WordManagement",
        "from": 17
      }
    ],
    "namespace": "",
    "versions": "17-21",
    "majors": [
      17,
      18,
      19,
      20,
      21
    ],
    "extends": null,
    "sourceTable": null,
    "sourceFile": "WordManagement.Codeunit.al",
    "obsolete": {
      "state": "Pending",
      "tag": "19.0",
      "reason": "Word DotNet libraries do not work in any of the supported clients. The functionality is replaced with Word Template Interactions codeunit."
    },
    "obsoleteSeenFrom": 18,
    "byVersion": {
      "17": {
        "app": "base-application",
        "name": "WordManagement",
        "ns": "",
        "obsolete": null,
        "target": "",
        "sourceTable": "",
        "counts": {
          "fields": 0,
          "keys": 0,
          "methods": 29,
          "values": 0
        },
        "stub": false
      },
      "18": {
        "app": "base-application",
        "name": "WordManagement",
        "ns": "",
        "obsolete": {
          "state": "Pending",
          "tag": "19.0",
          "reason": "Word DotNet libraries do not work in any of the supported clients. The functionality is replaced with Word Template Interactions codeunit."
        },
        "target": "",
        "sourceTable": "",
        "counts": {
          "fields": 0,
          "keys": 0,
          "methods": 29,
          "values": 0
        },
        "stub": false
      },
      "19": {
        "app": "base-application",
        "name": "WordManagement",
        "ns": "",
        "obsolete": {
          "state": "Pending",
          "tag": "19.0",
          "reason": "Word DotNet libraries do not work in any of the supported clients. The functionality is replaced with Word Template Interactions codeunit."
        },
        "target": "",
        "sourceTable": "",
        "counts": {
          "fields": 0,
          "keys": 0,
          "methods": 29,
          "values": 0
        },
        "stub": false
      },
      "20": {
        "app": "base-application",
        "name": "WordManagement",
        "ns": "",
        "obsolete": {
          "state": "Pending",
          "tag": "19.0",
          "reason": "Word DotNet libraries do not work in any of the supported clients. The functionality is replaced with Word Template Interactions codeunit."
        },
        "target": "",
        "sourceTable": "",
        "counts": {
          "fields": 0,
          "keys": 0,
          "methods": 14,
          "values": 0
        },
        "stub": false
      },
      "21": {
        "app": "base-application",
        "name": "WordManagement",
        "ns": "",
        "obsolete": {
          "state": "Pending",
          "tag": "19.0",
          "reason": "Word DotNet libraries do not work in any of the supported clients. The functionality is replaced with Word Template Interactions codeunit."
        },
        "target": "",
        "sourceTable": "",
        "counts": {
          "fields": 0,
          "keys": 0,
          "methods": 14,
          "values": 0
        },
        "stub": false
      }
    },
    "fields": [],
    "keys": [],
    "procedures": [
      {
        "name": "Activate",
        "sig": "(var Codeunit WordApplicationHandler, Integer)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "IsActive",
        "sig": "()",
        "returns": "Boolean",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "Boolean",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "Deactivate",
        "sig": "(Integer)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "TryGetWord",
        "sig": "(var DotNet ApplicationClass)",
        "returns": "Boolean",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that call this procedure are being removed as they use RunOnClient DotNet which does not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "Boolean",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that call this procedure are being removed as they use RunOnClient DotNet which does not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "CreateWordAttachment",
        "sig": "(Text[260], Code[10])",
        "returns": "Integer",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedure uses .NET which do not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "Integer",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedure uses .NET which do not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OpenWordAttachment",
        "sig": "(var Record Attachment, Text, Text[260], Boolean, Code[10])",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedure uses .NET which do not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedure uses .NET which do not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "Merge",
        "sig": "(var Record Delivery Sorter)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedure uses .NET which do not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedure uses .NET which do not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "ShowMergedDocument",
        "sig": "(var Record Segment Line, var Record Attachment, Text[260], Boolean)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedure uses .NET which do not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedure uses .NET which do not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "CreateHeader",
        "sig": "(var DotNet MergeHandler, Boolean, Text, Code[10])",
        "returns": "Integer",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that call this local procedure are being removed as they use .NET which do not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "Integer",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that call this local procedure are being removed as they use .NET which do not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "PopulateInterLogEntryToMergeSource",
        "sig": "(var File, var Record Attachment, Integer, var Boolean, Option)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "AddFieldsToMergeSource",
        "sig": "(var DotNet MergeHandler, var Record Interaction Log Entry, var Record Segment Line, Text, Integer)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "GetWordDocumentExtension",
        "sig": "(Text[30])",
        "returns": "Code[4]",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "Code[4]",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "IsWordDocumentExtension",
        "sig": "(Text)",
        "returns": "Boolean",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "Boolean",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      },
      {
        "name": "RunMergedDocument",
        "sig": "(var Record Segment Line, var Record Attachment, Text[260], Boolean, Boolean, Boolean)",
        "returns": "",
        "kind": "procedure",
        "access": "public",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedure uses .NET which do not function on non-Windows client types.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "procedure",
            "access": "public",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedure uses .NET which do not function on non-Windows client types.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "CanRunWordApp",
        "sig": "()",
        "returns": "Boolean",
        "kind": "procedure",
        "access": "public",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "Boolean",
            "kind": "procedure",
            "access": "public",
            "obsolete": null
          }
        ]
      }
    ],
    "events": [
      {
        "name": "OnAddFieldsToMergeSource",
        "sig": "(var Record Name/Value Buffer, Record Salesperson/Purchaser, Record Country/Region, Record Contact, Record Company Information, Record Segment Line, Record Interaction Log Entry)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": null
          }
        ]
      },
      {
        "name": "OnAddMultilineFieldDataOnBeforeFormatContactAddr",
        "sig": "(var Text[100], Record Contact, Code[10], Date, var Boolean)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": null
          }
        ]
      },
      {
        "name": "OnCreateHeaderAddFields",
        "sig": "(var Record Name/Value Buffer, Record Salesperson/Purchaser, Record Country/Region, Record Contact, Record Company Information, Record Segment Line, Record Interaction Log Entry)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnBeforeAddFieldsToMergeSource",
        "sig": "(var Record Segment Line, var Record Delivery Sorter)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnBeforeCheckCanRunWord",
        "sig": "(var Boolean, var Boolean)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": null
          }
        ]
      },
      {
        "name": "OnBeforeDeleteFile",
        "sig": "(Text, var Boolean, var Boolean)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnBeforeInitMergeFields",
        "sig": "(var Record Interaction Log Entry, var Record Segment Line)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": null
          }
        ]
      },
      {
        "name": "OnFindActiveSubscriber",
        "sig": "(var Boolean)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": null
          }
        ]
      },
      {
        "name": "OnGetWord",
        "sig": "(var DotNet ApplicationClass, var Boolean)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnDeactivate",
        "sig": "(Integer)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": null,
        "majors": [
          17,
          18,
          19,
          20,
          21
        ],
        "range": "17-21",
        "first": 17,
        "last": 21,
        "obsoleteSince": null,
        "spans": [
          {
            "from": 17,
            "to": 21,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": null
          }
        ]
      },
      {
        "name": "OnExecuteMergeFaxMailToValueCaseElse",
        "sig": "(var Record Delivery Sorter, var Text)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnExecuteMergeWordDocumentCaseElse",
        "sig": "(var Record Delivery Sorter)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnHandleWordDocumentWithoutMergeCorrespondenceTypeCaseElse",
        "sig": "(var Record Interaction Log Entry, var Record Delivery Sorter)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      },
      {
        "name": "OnSendAttachmentWithoutMergeFieldsCorrespondenceTypeCaseElse",
        "sig": "(var Record Attachment, var Record Delivery Sorter)",
        "returns": "",
        "kind": "integrationevent",
        "access": "local",
        "obsolete": {
          "state": "Pending",
          "reason": "Procedures that trigger this event are obsolete and will be removed.",
          "tag": "17.3"
        },
        "majors": [
          17,
          18,
          19
        ],
        "range": "17-19",
        "first": 17,
        "last": 19,
        "obsoleteSince": 17,
        "spans": [
          {
            "from": 17,
            "to": 19,
            "returns": "",
            "kind": "integrationevent",
            "access": "local",
            "obsolete": {
              "state": "Pending",
              "reason": "Procedures that trigger this event are obsolete and will be removed.",
              "tag": "17.3"
            }
          }
        ]
      }
    ],
    "values": []
  }
}