Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions docs/code-snippets/officeruntime-snippets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,48 @@ OfficeRuntime.Auth#getAccessToken:member(1):
}
}
}
OfficeRuntime.AuthOptions:interface:
- |-
const options: OfficeRuntime.AuthOptions = {
allowSignInPrompt: true,
allowConsentPrompt: true,
forMSGraphAccess: true,
};
const accessToken = await OfficeRuntime.auth.getAccessToken(options);
OfficeRuntime.Dialog:interface:
- |-
const dialogUrl = "https://your-addin-domain.com/dialog.html";
const dialogOptions: OfficeRuntime.DisplayWebDialogOptions = {
height: "50%",
width: "50%",
displayInIFrame: false,
onMessage: function (message: string, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog result: " + message);
},
onRuntimeError: function (error: Error, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog error: " + error.message);
},
}
OfficeRuntime.displayWebDialog(dialogUrl, dialogOptions);
OfficeRuntime.DisplayWebDialogOptions:interface:
- |-
const dialogUrl = "https://your-addin-domain.com/dialog.html";
const dialogOptions: OfficeRuntime.DisplayWebDialogOptions = {
height: "50%",
width: "50%",
displayInIFrame: false,
onMessage: function (message: string, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog result: " + message);
},
onRuntimeError: function (error: Error, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog error: " + error.message);
},
}
OfficeRuntime.displayWebDialog(dialogUrl, dialogOptions);
OfficeRuntime.Storage#getItem:member(1):
- |-
// Retrieve a value from the shared runtime storage by its key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@ summary: Provides options for the user experience when Office obtains an access
remarks: |-
The methods in this interface are equivalent to those in the `Office.AuthOptions` interface. If new authentication types are added in the future, they will only be added to the `Office.AuthOptions` interface. For simplicity, the code examples throughout the documentation use `Office.AuthOptions`<!-- -->.



#### Used by

- [OfficeRuntime.Auth](/javascript/api/office-runtime/officeruntime.auth): [getAccessToken](/javascript/api/office-runtime/officeruntime.auth#office-runtime-officeruntime-auth-getaccesstoken-member(1))
#### Examples

```TypeScript
const options: OfficeRuntime.AuthOptions = {
allowSignInPrompt: true,
allowConsentPrompt: true,
forMSGraphAccess: true,
};
const accessToken = await OfficeRuntime.auth.getAccessToken(options);
```

isPreview: false
isDeprecated: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,31 @@ summary: Object representing the dialog box.
remarks: |-
[API set: CustomFunctionsRuntime 1.1](/office/dev/add-ins/reference/javascript-api-for-office)



#### Used by

- [OfficeRuntime](/javascript/api/office-runtime): [displayWebDialog](/javascript/api/office-runtime#office-runtime-officeruntime-displaywebdialog-function(1))
- [OfficeRuntime.DisplayWebDialogOptions](/javascript/api/office-runtime/officeruntime.displaywebdialogoptions): [onMessage](/javascript/api/office-runtime/officeruntime.displaywebdialogoptions#office-runtime-officeruntime-displaywebdialogoptions-onmessage-member), [onRuntimeError](/javascript/api/office-runtime/officeruntime.displaywebdialogoptions#office-runtime-officeruntime-displaywebdialogoptions-onruntimeerror-member)
#### Examples

```TypeScript
const dialogUrl = "https://your-addin-domain.com/dialog.html";
const dialogOptions: OfficeRuntime.DisplayWebDialogOptions = {
height: "50%",
width: "50%",
displayInIFrame: false,
onMessage: function (message: string, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog result: " + message);
},
onRuntimeError: function (error: Error, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog error: " + error.message);
},
}
OfficeRuntime.displayWebDialog(dialogUrl, dialogOptions);
```

isPreview: false
isDeprecated: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,30 @@ summary: Provides display options and actions a dialog box may take.
remarks: |-
[API set: CustomFunctionsRuntime 1.1](/office/dev/add-ins/reference/javascript-api-for-office)



#### Used by

- [OfficeRuntime](/javascript/api/office-runtime): [displayWebDialog](/javascript/api/office-runtime#office-runtime-officeruntime-displaywebdialog-function(1))
#### Examples

```TypeScript
const dialogUrl = "https://your-addin-domain.com/dialog.html";
const dialogOptions: OfficeRuntime.DisplayWebDialogOptions = {
height: "50%",
width: "50%",
displayInIFrame: false,
onMessage: function (message: string, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog result: " + message);
},
onRuntimeError: function (error: Error, dialog?: OfficeRuntime.Dialog) {
dialog?.close();
console.log("Dialog error: " + error.message);
},
}
OfficeRuntime.displayWebDialog(dialogUrl, dialogOptions);
```

isPreview: false
isDeprecated: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Provides an option for preserving context data of any type, unchanged,
remarks: |-



#### Used by

- [Office.AppointmentCompose](/javascript/api/outlook/office.appointmentcompose): [addFileAttachmentAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-addfileattachmentasync-member(1)), [addFileAttachmentFromBase64Async](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-addfileattachmentfrombase64async-member(1)), [addHandlerAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-addhandlerasync-member(1)), [addItemAttachmentAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-additemattachmentasync-member(1)), [disableClientSignatureAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-disableclientsignatureasync-member(1)), [getAttachmentContentAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getattachmentcontentasync-member(1)), [getAttachmentsAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getattachmentsasync-member(1)), [getInitializationContextAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getinitializationcontextasync-member(1)), [getItemIdAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getitemidasync-member(1)), [getSelectedDataAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getselecteddataasync-member(1)), [getSharedPropertiesAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getsharedpropertiesasync-member(1)), [isClientSignatureEnabledAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-isclientsignatureenabledasync-member(1)), [removeAttachmentAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-removeattachmentasync-member(1)), [removeHandlerAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-removehandlerasync-member(1)), [saveAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-saveasync-member(1)), [sendAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-sendasync-member(1)), [setSelectedDataAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-setselecteddataasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.asyncresult.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ summary: |-
remarks: |-



#### Used by

- [Office](/javascript/api/office): [select](/javascript/api/office#office-office-select-function(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
Returned by the `status` property of the [AsyncResult](xref:office!Office.AsyncResult:interface) object.



#### Used by

- [Office.AsyncResult](/javascript/api/office/office.asyncresult): [status](/javascript/api/office/office.asyncresult#office-office-asyncresult-status-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
**Requirement set**: [SharedRuntime 1.2](https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets)



#### Used by

- [Office.Addin](/javascript/api/office/office.addin): [beforeDocumentCloseNotification](/javascript/api/office/office.addin#office-office-addin-beforedocumentclosenotification-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Provides information about the binding that raised the DataChanged even
remarks: |-



#### Used by

- [Office.RemoveHandlerOptions](/javascript/api/office/office.removehandleroptions): [handler](/javascript/api/office/office.removehandleroptions#office-office-removehandleroptions-handler-member)
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.bindingtype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Specifies the type of the binding object that should be returned.
remarks: |-



#### Used by

- [Office.Binding](/javascript/api/office/office.binding): [type](/javascript/api/office/office.binding#office-office-binding-type-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ remarks: |-
- [ImageCoercion 1.2](https://learn.microsoft.com/javascript/api/requirement-sets/common/image-coercion-requirement-sets#imagecoercion-12) (when using `Office.CoercionType.XmlSvg`<!-- -->)



#### Used by

- [Office.AppointmentCompose](/javascript/api/outlook/office.appointmentcompose): [getSelectedDataAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-getselecteddataasync-member(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ remarks: |-
**Requirement set**: [ContextMenuApi 1.1](https://learn.microsoft.com/javascript/api/requirement-sets/common/context-menu-api-requirement-sets)



#### Used by

- [Office.ContextMenuUpdaterData](/javascript/api/office/office.contextmenuupdaterdata): [controls](/javascript/api/office/office.contextmenuupdaterdata#office-office-contextmenuupdaterdata-controls-member)
Expand Down
1 change: 0 additions & 1 deletion docs/docs-ref-autogen/office/office/office.control.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ remarks: |-
**Requirement set**: [RibbonApi 1.1](https://learn.microsoft.com/javascript/api/requirement-sets/common/ribbon-api-requirement-sets)



#### Used by

- [Office.Group](/javascript/api/office/office.group): [controls](/javascript/api/office/office.group#office-office-group-controls-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ remarks: |-
**Requirement set**: [DevicePermission 1.1](https://learn.microsoft.com/javascript/api/requirement-sets/common/device-permission-service-requirement-sets)



#### Used by

- [Office.DevicePermission](/javascript/api/office/office.devicepermission): [requestPermissions](/javascript/api/office/office.devicepermission#office-office-devicepermission-requestpermissions-member(1)), [requestPermissionsAsync](/javascript/api/office/office.devicepermission#office-office-devicepermission-requestpermissionsasync-member(1))
Expand Down
1 change: 0 additions & 1 deletion docs/docs-ref-autogen/office/office/office.dialog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
**Requirement set**: [DialogApi](https://learn.microsoft.com/javascript/api/requirement-sets/common/dialog-api-requirement-sets)



#### Used by

- [Office.UI](/javascript/api/office/office.ui): [displayDialogAsync](/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ summary: |-
remarks: |-



#### Used by

- [Office.UI](/javascript/api/office/office.ui): [addHandlerAsync](/javascript/api/office/office.ui#office-office-ui-addhandlerasync-member(1))
Expand Down
1 change: 0 additions & 1 deletion docs/docs-ref-autogen/office/office/office.document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
**Applications**: Excel, PowerPoint, Project, Word



#### Used by

- [Office.Binding](/javascript/api/office/office.binding): [document](/javascript/api/office/office.binding#office-office-binding-document-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
Returned by the mode property of the [Document](xref:office!Office.Document:interface) object.



#### Used by

- [Office.Document](/javascript/api/office/office.document): [mode](/javascript/api/office/office.document#office-office-document-mode-member)
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.eventtype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ summary: |-
remarks: |-



#### Used by

- [Office.AppointmentCompose](/javascript/api/outlook/office.appointmentcompose): [addHandlerAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-addhandlerasync-member(1)), [removeHandlerAsync](/javascript/api/outlook/office.appointmentcompose#outlook-office-appointmentcompose-removehandlerasync-member(1))
Expand Down
1 change: 0 additions & 1 deletion docs/docs-ref-autogen/office/office/office.file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
Access the File object with the AsyncResult.value property in the callback function passed to the Document.getFileAsync method.



#### Used by

- [Office.Document](/javascript/api/office/office.document): [getFileAsync](/javascript/api/office/office.document#office-office-document-getfileasync-member(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: ''
remarks: |-



#### Used by

- [Office.Document](/javascript/api/office/office.document): [getFilePropertiesAsync](/javascript/api/office/office.document#office-office-document-getfilepropertiesasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.filetype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Specifies the format in which to return the document.
remarks: |-



#### Used by

- [Office.Document](/javascript/api/office/office.document): [getFileAsync](/javascript/api/office/office.document#office-office-document-getfileasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.filtertype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Specifies whether filtering from the Office application is applied when
remarks: |-



#### Used by

- [Office.GetBindingDataOptions](/javascript/api/office/office.getbindingdataoptions): [filterType](/javascript/api/office/office.getbindingdataoptions#office-office-getbindingdataoptions-filtertype-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Provides options for customizing what data is returned and how it is fo
remarks: |-



#### Used by

- [Office.Document](/javascript/api/office/office.document): [getSelectedDataAsync](/javascript/api/office/office.document#office-office-document-getselecteddataasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.gototype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Specifies the type of place or object to navigate to.
remarks: |-



#### Used by

- [Office.Document](/javascript/api/office/office.document): [goToByIdAsync](/javascript/api/office/office.document#office-office-document-gotobyidasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.group.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ summary: |-
remarks: |-



#### Used by

- [Office.Tab](/javascript/api/office/office.tab): [groups](/javascript/api/office/office.tab#office-office-tab-groups-member)
Expand Down
1 change: 0 additions & 1 deletion docs/docs-ref-autogen/office/office/office.hosttype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
**Important**: In Outlook, this enum is available starting with Mailbox requirement set 1.5.



#### Used by

- [Office](/javascript/api/office): [onReady](/javascript/api/office#office-office-onready-function(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Specifies whether the add-in was just inserted or was already contained
remarks: |-



#### Used by

- [Office](/javascript/api/office): [initialize](/javascript/api/office#office-office-initialize-function(1))
Expand Down
1 change: 0 additions & 1 deletion docs/docs-ref-autogen/office/office/office.officetheme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ remarks: |-
**Important**: In Outlook, the Office theme API is supported starting in [Mailbox requirement set 1.14](https://learn.microsoft.com/javascript/api/requirement-sets/outlook/outlook-requirement-set-1-14)<!-- -->. It isn't supported in Outlook add-ins that implement [event-based activation](https://learn.microsoft.com/office/dev/add-ins/develop/event-based-activation)<!-- -->.



#### Used by

- [Office.Context](/javascript/api/office/office.context): [officeTheme](/javascript/api/office/office.context#office-office-context-officetheme-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ remarks: |-
**Important**: In Outlook, this enum is available starting with Mailbox requirement set 1.5.



#### Used by

- [Office](/javascript/api/office): [onReady](/javascript/api/office#office-office-onready-function(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: 'Specifies a cell, or row, or column, by its zero-based row and/or colu
remarks: |-



#### Used by

- [Office.RangeFormatConfiguration](/javascript/api/office/office.rangeformatconfiguration): [cells](/javascript/api/office/office.rangeformatconfiguration#office-office-rangeformatconfiguration-cells-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Specifies a range and its formatting.
remarks: |-



#### Used by

- [Office.SetBindingDataOptions](/javascript/api/office/office.setbindingdataoptions): [cellFormat](/javascript/api/office/office.setbindingdataoptions#office-office-setbindingdataoptions-cellformat-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Provides information about which Requirement Sets are supported in the
remarks: |-



#### Used by

- [Office.Context](/javascript/api/office/office.context): [requirements](/javascript/api/office/office.context#office-office-context-requirements-member)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Provides options for saving settings.
remarks: |-



#### Used by

- [Office.Settings](/javascript/api/office/office.settings): [saveAsync](/javascript/api/office/office.settings#office-office-settings-saveasync-member(1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Provides options for how to insert data to the selection.
remarks: |-



#### Used by

- [Office.Document](/javascript/api/office/office.document): [setSelectedDataAsync](/javascript/api/office/office.document#office-office-document-setselecteddataasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.slice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Represents a slice of a document file. The Slice object is accessed wit
remarks: |-



#### Used by

- [Office.File](/javascript/api/office/office.file): [getSliceAsync](/javascript/api/office/office.file#office-office-file-getsliceasync-member(1))
Expand Down
1 change: 1 addition & 0 deletions docs/docs-ref-autogen/office/office/office.sliderange.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ summary: Represents the selected slides in a PowerPoint presentation. This objec
remarks: |-



#### Used by

- [Office.Document](/javascript/api/office/office.document): [getSelectedDataAsync](/javascript/api/office/office.document#office-office-document-getselecteddataasync-member(4))
Expand Down
Loading