|
1 | 1 | ---
|
2 | 2 | title: Content Office Add-ins
|
3 | 3 | 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.
|
4 |
| -ms.date: 06/27/2024 |
| 4 | +ms.date: 02/12/2025 |
5 | 5 | ms.topic: overview
|
6 | 6 | ms.localizationpriority: medium
|
7 | 7 | ---
|
@@ -41,11 +41,46 @@ For Mac, the personality menu measures 26x26 pixels, but floats 8 pixels in from
|
41 | 41 |
|
42 | 42 | ## Implementation
|
43 | 43 |
|
44 |
| -There are minor differences in the manifests between content add-ins and add-ins that use task panes. |
| 44 | +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're using. |
| 45 | + |
| 46 | +# [Unified manifest for Microsoft 365](#tab/jsonmanifest) |
| 47 | + |
| 48 | +> [!NOTE] |
| 49 | +> The unified manifest is available in Excel, PowerPoint, and Word as a developer preview. For Outlook, it's generally available and can be used in production add-ins. |
| 50 | +
|
| 51 | +Configure the manifest with the following steps. |
| 52 | + |
| 53 | +1. Add a "contentRuntimes" child array to the extension object in the "extensions" array. |
| 54 | +1. Remove the "runtimes" property if it is present. The "runtimes" array is for task pane or mail add-ins. These cannot be combined with a content add-in. |
| 55 | +1. Add an anonymous content runtime object in the "contentRuntimes" array. |
| 56 | +1. Set the "id" property of the object to a descriptive name. |
| 57 | +1. Set the "code.page" object to the full URL of the custom content that you want to embed in the document. |
| 58 | +1. Optionally, set the "requestedWidth" and "requestedHeight" properties to a size between 32 and 1000 pixels. If these properties aren't used, the Office application determines the size. |
| 59 | +1. Optionally, set the "disableSnapshot" property to `true` to prevent Office from saving a snapshot of the content component with the document. |
| 60 | + |
| 61 | +The following is an example of a "contentRuntimes" property. |
| 62 | + |
| 63 | +```json |
| 64 | +"contentRuntimes": [ |
| 65 | + { |
| 66 | + "id": "ContentRuntime", |
| 67 | + "code": { |
| 68 | + "page": "https://localhost:3000/content.html" |
| 69 | + }, |
| 70 | + "requestedWidth": 100, |
| 71 | + "requestedHeight": 100, |
| 72 | + "disableSnapshot": true, |
| 73 | + } |
| 74 | +] |
| 75 | +``` |
| 76 | + |
| 77 | +# [XML Manifest](#tab/xmlmanifest) |
45 | 78 |
|
46 | 79 | - For the **\<[OfficeApp](/javascript/api/manifest/officeapp)\>** element, set the `xsi:type` attribute to `"ContentApp"`.
|
47 | 80 | - In the **\<[DefaultSettings](/javascript/api/manifest/defaultsettings)\>** element, add the **\<[RequestedHeight](/javascript/api/manifest/requestedheight)\>** and **\<[RequestedWidth](/javascript/api/manifest/requestedwidth)\>** elements.
|
48 | 81 |
|
| 82 | +--- |
| 83 | + |
49 | 84 | 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.
|
50 | 85 |
|
51 | 86 | 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).
|
|
0 commit comments