Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configures a page of content that is embedded in an Excel or PowerPoint document.
Properties that reference this object type:
Syntax
{
"requirements": {
"capabilities": [
{
capabilities object
}
],
"scopes": [
"mail | workbook | document | presentation"
],
"formFactors": [
"desktop | mobile"
]
},
"id": "{string}",
"code": {
"page": "{string}",
"script": "{string}"
},
"requestedHeight": {number},
"requestedWidth": {number},
"disableSnapshot": {boolean}
}
{
"requirements": {
"capabilities": [
{
capabilities object
}
],
"scopes": [
"mail | workbook | document | presentation"
],
"formFactors": [
"desktop | mobile"
]
},
"id": "{string}",
"code": {
"page": "{string}",
"script": "{string}"
},
"requestedHeight": {number},
"requestedWidth": {number},
"disableSnapshot": {boolean}
}
Properties
requirements
Required
—
Constraints
Supported values
requirements
Specifies the Office requirement sets for content add-in runtime. If the user's Office version doesn't support the specified requirements, the component will not be available in that client.
Required
—
Constraints
Supported values
id
A unique identifier for this runtime within the app. This is developer specified.
Type
string
Required
✅
Constraints
Maximum string length: 64.
Supported values
code
Type
extensionRuntimeCode
Required
✅
Constraints
Supported values
code
Specifies the location of code for this runtime. Depending on the runtime.type, add-ins use either a JavaScript file or an HTML page with an embedded <script> tag that specifies the URL of a JavaScript file.
Type
extensionRuntimeCode
Required
✅
Constraints
Supported values
requestedHeight
The desired height in pixels for the initial content placeholder. This value MUST be between 32 and 1000 pixels. Default value will be determined by host.
Type
number
Required
—
Constraints
Maximum number value: 1000.
Supported values
requestedWidth
The desired width in pixels for the initial content placeholder. This value MUST be between 32 and 1000 pixels. Default value will be determined by host.
Type
number
Required
—
Constraints
Maximum number value: 1000.
Supported values
disableSnapshot
Specifies whether a snapshot image of your content add-in is saved with the host document. Default value is false. Set true to disable.
Important
Leaving this property with its default value of false makes an image of the add-in visible for users that open the document in a version of the Office application that doesn't support Office Add-ins, or provides a static image of the add-in if the application can't connect to the server hosting the add-in. However, this also means that potentially sensitive information displayed in the add-in can be accessed directly from the document hosting the add-in.
Type
boolean
Required
—
Constraints
Supported values
Default value: False
.
Remarks
Note
An object in the extensions
array may not have both a runtimes
and a contentRuntimes
property.
Examples
{
"extensions": [
{
"contentRuntimes": [
{
"id": "ContentRuntime",
"code": {
"page": "https://localhost:3000/content.html"
},
"requestedWidth": 100,
"requestedHeight": 100,
"disableSnapshot": true,
}
]
}
]
}