Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Excel PowerPoint] (content addins) add support for unified manifest #4668

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
44 changes: 42 additions & 2 deletions docs/design/content-add-ins.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Content Office Add-ins
description: Content add-ins are surfaces that can be embedded directly into Excel or PowerPoint documents that give users access to interface controls that run code to modify documents or display data from a data source.
ms.date: 06/27/2024
ms.date: 07/17/2024
ms.topic: overview
ms.localizationpriority: medium
---
Expand Down Expand Up @@ -41,11 +41,51 @@ For Mac, the personality menu measures 26x26 pixels, but floats 8 pixels in from

## Implementation

There are minor differences in the manifests between content add-ins and add-ins that use task panes.
There are minor differences in the manifests between content add-ins and add-ins that use task panes. Open the tab for the type of manifest you are using.
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved

# [Unified manifest for Microsoft 365](#tab/jsonmanifest)

> [!NOTE]
> The unified manifest is available in Excel, PowerPoint, and Word as a developer preview. For Outlook, it is generally available and can be used in production add-ins.
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved

Configure the manifest with the following steps:
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved

1. Add a "contentRuntimes" child array to the extension object in the "extensions" array.
1. Add an anonymous content runtime object in the "contentRuntimes" array.
1. Set the "id" property of the object to a descriptive name.
1. Set the "code.page" object to the full URL of the page that contains the content.
1. Optionally, set the "requestedWidth" and "requestedHeight" properties to a size between 32 and 1000 pixels. If these properties are not used, the Office application determines the size.
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved
1. Optionally, set the the "disableSnapshot" property to `true` to prevent Office from saving a snapshot of the content component with the document.
Rick-Kirkham marked this conversation as resolved.
Show resolved Hide resolved
1. Optionally, add a "requirements.scopes" property to restrict the installability of the content component to only Excel or only PowerPoint. The allowed values are "workbook" and "presentation". (Listing both means the content component is available in both, which is the same as having no "requirements" property at all.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like requirements property is on this object. If so, will you be updating the requirements property article in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like requirements property is on this object. If so, will you be updating the requirements property article in this PR?

Good catch. I should do that in the same PR.


The following is an example of a "contentRuntimes" property.

```json
"contentRuntimes": [
{
"id": "ContentRuntime",
"code": {
"page": "https://localhost:3000/content.html"
},
"requestedWidth": 100,
"requestedHeight": 100,
"disableSnapshot": true,
"requirements": {
"scopes": [
"workbook"
]
},
}
]
```

# [XML Manifest](#tab/xmlmanifest)

- For the **\<[OfficeApp](/javascript/api/manifest/officeapp)\>** element, set the `xsi:type` attribute to `"ContentApp"`.
- In the **\<[DefaultSettings](/javascript/api/manifest/defaultsettings)\>** element, add the **\<[RequestedHeight](/javascript/api/manifest/requestedheight)\>** and **\<[RequestedWidth](/javascript/api/manifest/requestedwidth)\>** elements.

---

For a sample that implements a content add-in, see [Excel Content Add-in Humongous Insurance](https://github.com/OfficeDev/Excel-Content-Add-in-Humongous-Insurance) on GitHub.

To create your own content add-in, see the [Excel content add-in quick start](../quickstarts/excel-quickstart-content.md) and [PowerPoint content add-in quick start](../quickstarts/powerpoint-quickstart-content.md).
Expand Down