---
title: "Codeunit 1637 Office Document Handler"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/1637-office-document-handler/
type: codeunit
id: 1637
name: "Office Document Handler"
app: "Base Application"
namespace: Microsoft.CRM.Outlook
versions: "17-28"
build: 28.5.54151.54365
source: "https://jonas-paprotka.de/ref/codeunit/1637-office-document-handler/source/29/"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 1637 Office Document Handler

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/1637-office-document-handler/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.CRM.Outlook |
| Versions | 17-28 |
| Source file | CRM/Outlook/OfficeDocumentHandler.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| RedirectToDocument | (Record Office Add-in Context) | - | public | 17-28 | - | - |
| ShowDocumentSelection | (Integer, Integer) | - | public | 17-28 | - | - |
| HandleSalesCommand | (Record Customer, Record Office Add-in Context) | - | public | 17-28 | - | - |
| HandlePurchaseCommand | (Record Vendor, Record Office Add-in Context) | - | public | 17-28 | - | - |
| OpenIndividualDocument | (Record Office Add-in Context, Record Office Document Selection) | - | public | 17-28 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnCloseSuggestedLineItemsPage | (var Record Office Suggested Line Item, var RecordRef, Action) | 17-28 | - | - |
| Integration event | OnGenerateLinesFromText | (var RecordRef, var Record Office Suggested Line Item, Text) | 17-28 | - | - |
| Integration event | OnOpenIndividualSalesDocumentOnBeforeOpenPage | (var Record Office Document Selection, var Record Office Add-in Context, var Boolean) | 21-28 | - | - |
| Integration event | OnOpenIndividualPurchaseDocumentOnBeforeOpenPage | (var Record Office Document Selection, var Record Office Add-in Context, var Boolean) | 21-28 | - | - |

## 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.
AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at a66254c3b8b5bb1cea290dc8f9d097aec4381153.

Jonas Paprotka, 2026-09-20.
