@types/office-js 1.0.566 → 1.0.568
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- office-js/README.md +1 -1
- office-js/index.d.ts +424 -26
- office-js/package.json +2 -2
office-js/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for office-js (https://github.com/OfficeD
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 06 Jan 2026 21:35:44 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
office-js/index.d.ts
CHANGED
|
@@ -5921,17 +5921,58 @@ declare namespace Office {
|
|
|
5921
5921
|
*
|
|
5922
5922
|
* **Requirement sets**:
|
|
5923
5923
|
*
|
|
5924
|
-
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#
|
|
5924
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
5925
5925
|
*
|
|
5926
|
-
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#
|
|
5926
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion}
|
|
5927
5927
|
*
|
|
5928
|
-
*
|
|
5928
|
+
* **Supported applications**: Excel, PowerPoint, Project, Word
|
|
5929
|
+
*
|
|
5930
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
5931
|
+
* the following information.
|
|
5932
|
+
*
|
|
5933
|
+
* <table>
|
|
5934
|
+
* <tr>
|
|
5935
|
+
* <th>Property</th>
|
|
5936
|
+
* <th>Use</th>
|
|
5937
|
+
* </tr>
|
|
5938
|
+
* <tr>
|
|
5939
|
+
* <td><code>AsyncResult.value</code></td>
|
|
5940
|
+
* <td>Access the selected data as a string. If the selection does not contain text, returns an empty string.</td>
|
|
5941
|
+
* </tr>
|
|
5942
|
+
* <tr>
|
|
5943
|
+
* <td><code>AsyncResult.status</code></td>
|
|
5944
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
5945
|
+
* </tr>
|
|
5946
|
+
* <tr>
|
|
5947
|
+
* <td><code>AsyncResult.error</code></td>
|
|
5948
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
5949
|
+
* </tr>
|
|
5950
|
+
* <tr>
|
|
5951
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
5952
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
5953
|
+
* </tr>
|
|
5954
|
+
* </table>
|
|
5955
|
+
*
|
|
5956
|
+
* @param coercionType Must be `Office.CoercionType.Text`.
|
|
5957
|
+
*
|
|
5958
|
+
* @param options Provides options for customizing what data is returned and how it is formatted.
|
|
5959
|
+
*
|
|
5960
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
5961
|
+
* The `value` property of the result is a string containing the selected text.
|
|
5962
|
+
*/
|
|
5963
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.Text, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<string>) => void): void;
|
|
5964
|
+
/**
|
|
5965
|
+
* Reads the data contained in the current selection in the document.
|
|
5966
|
+
*
|
|
5967
|
+
* @remarks
|
|
5968
|
+
*
|
|
5969
|
+
* **Requirement sets**:
|
|
5929
5970
|
*
|
|
5930
5971
|
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
5931
5972
|
*
|
|
5932
|
-
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion}
|
|
5973
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion}
|
|
5933
5974
|
*
|
|
5934
|
-
*
|
|
5975
|
+
* **Supported applications**: Excel, Word
|
|
5935
5976
|
*
|
|
5936
5977
|
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
5937
5978
|
* the following information.
|
|
@@ -5943,7 +5984,93 @@ declare namespace Office {
|
|
|
5943
5984
|
* </tr>
|
|
5944
5985
|
* <tr>
|
|
5945
5986
|
* <td><code>AsyncResult.value</code></td>
|
|
5946
|
-
* <td>
|
|
5987
|
+
* <td>Access the selected data as a {@link Office.TableData} object. Returns null if no table is selected.</td>
|
|
5988
|
+
* </tr>
|
|
5989
|
+
* <tr>
|
|
5990
|
+
* <td><code>AsyncResult.status</code></td>
|
|
5991
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
5992
|
+
* </tr>
|
|
5993
|
+
* <tr>
|
|
5994
|
+
* <td><code>AsyncResult.error</code></td>
|
|
5995
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
5996
|
+
* </tr>
|
|
5997
|
+
* <tr>
|
|
5998
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
5999
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6000
|
+
* </tr>
|
|
6001
|
+
* </table>
|
|
6002
|
+
*
|
|
6003
|
+
* @param coercionType Must be `Office.CoercionType.Table`.
|
|
6004
|
+
* @param options Provides options for customizing what data is returned and how it is formatted.
|
|
6005
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6006
|
+
* The `value` property of the result is a {@link Office.TableData} object containing the data in the current selection.
|
|
6007
|
+
*/
|
|
6008
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.Table, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<TableData>) => void): void;
|
|
6009
|
+
/**
|
|
6010
|
+
* Reads the data contained in the current selection in the document.
|
|
6011
|
+
*
|
|
6012
|
+
* @remarks
|
|
6013
|
+
*
|
|
6014
|
+
* **Requirement sets**:
|
|
6015
|
+
*
|
|
6016
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6017
|
+
*
|
|
6018
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion}
|
|
6019
|
+
*
|
|
6020
|
+
* **Supported applications**: Excel, Word
|
|
6021
|
+
*
|
|
6022
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6023
|
+
* the following information.
|
|
6024
|
+
*
|
|
6025
|
+
* <table>
|
|
6026
|
+
* <tr>
|
|
6027
|
+
* <th>Property</th>
|
|
6028
|
+
* <th>Use</th>
|
|
6029
|
+
* </tr>
|
|
6030
|
+
* <tr>
|
|
6031
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6032
|
+
* <td>Access the selected data as an array of arrays. Returns an empty array if no data is selected.</td>
|
|
6033
|
+
* </tr>
|
|
6034
|
+
* <tr>
|
|
6035
|
+
* <td><code>AsyncResult.status</code></td>
|
|
6036
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
6037
|
+
* </tr>
|
|
6038
|
+
* <tr>
|
|
6039
|
+
* <td><code>AsyncResult.error</code></td>
|
|
6040
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6041
|
+
* </tr>
|
|
6042
|
+
* <tr>
|
|
6043
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6044
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6045
|
+
* </tr>
|
|
6046
|
+
* </table>
|
|
6047
|
+
*
|
|
6048
|
+
* @param coercionType Must be `Office.CoercionType.Matrix`.
|
|
6049
|
+
* @param options Provides options for customizing what data is returned and how it is formatted.
|
|
6050
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6051
|
+
* The `value` property of the result is an array of arrays containing the data in the current selection.
|
|
6052
|
+
*/
|
|
6053
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.Matrix, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<any[][]>) => void): void;
|
|
6054
|
+
/**
|
|
6055
|
+
* Reads the data contained in the current selection in the document.
|
|
6056
|
+
*
|
|
6057
|
+
* @remarks
|
|
6058
|
+
*
|
|
6059
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6060
|
+
*
|
|
6061
|
+
* **Supported application**: PowerPoint
|
|
6062
|
+
*
|
|
6063
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6064
|
+
* the following information.
|
|
6065
|
+
*
|
|
6066
|
+
* <table>
|
|
6067
|
+
* <tr>
|
|
6068
|
+
* <th>Property</th>
|
|
6069
|
+
* <th>Use</th>
|
|
6070
|
+
* </tr>
|
|
6071
|
+
* <tr>
|
|
6072
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6073
|
+
* <td>Access the selected slides as a {@link Office.SlideRange} object containing the IDs, titles, and indexes of the selected slides.</td>
|
|
5947
6074
|
* </tr>
|
|
5948
6075
|
* <tr>
|
|
5949
6076
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -5959,6 +6086,31 @@ declare namespace Office {
|
|
|
5959
6086
|
* </tr>
|
|
5960
6087
|
* </table>
|
|
5961
6088
|
*
|
|
6089
|
+
* @param coercionType Must be `Office.CoercionType.SlideRange`.
|
|
6090
|
+
* @param options Provides options for customizing what data is returned and how it is formatted.
|
|
6091
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6092
|
+
* The `value` property of the result is a {@link Office.SlideRange} object containing the selected slides.
|
|
6093
|
+
*/
|
|
6094
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.SlideRange, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<SlideRange>) => void): void;
|
|
6095
|
+
/**
|
|
6096
|
+
* Reads the data contained in the current selection in the document.
|
|
6097
|
+
*
|
|
6098
|
+
* @remarks
|
|
6099
|
+
*
|
|
6100
|
+
* **Requirement sets**:
|
|
6101
|
+
*
|
|
6102
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`)
|
|
6103
|
+
*
|
|
6104
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`)
|
|
6105
|
+
*
|
|
6106
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`)
|
|
6107
|
+
*
|
|
6108
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6109
|
+
*
|
|
6110
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`)
|
|
6111
|
+
*
|
|
6112
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`)
|
|
6113
|
+
*
|
|
5962
6114
|
* The possible values for the {@link Office.CoercionType} parameter vary by the Office application.
|
|
5963
6115
|
*
|
|
5964
6116
|
* <table>
|
|
@@ -5996,10 +6148,37 @@ declare namespace Office {
|
|
|
5996
6148
|
* </tr>
|
|
5997
6149
|
* </table>
|
|
5998
6150
|
*
|
|
5999
|
-
*
|
|
6151
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6152
|
+
* the following information.
|
|
6000
6153
|
*
|
|
6001
|
-
*
|
|
6154
|
+
* <table>
|
|
6155
|
+
* <tr>
|
|
6156
|
+
* <th>Property</th>
|
|
6157
|
+
* <th>Use</th>
|
|
6158
|
+
* </tr>
|
|
6159
|
+
* <tr>
|
|
6160
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6161
|
+
* <td>Access the selected data. The type depends on the coercionType parameter specified in the call.</td>
|
|
6162
|
+
* </tr>
|
|
6163
|
+
* <tr>
|
|
6164
|
+
* <td><code>AsyncResult.status</code></td>
|
|
6165
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
6166
|
+
* </tr>
|
|
6167
|
+
* <tr>
|
|
6168
|
+
* <td><code>AsyncResult.error</code></td>
|
|
6169
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6170
|
+
* </tr>
|
|
6171
|
+
* <tr>
|
|
6172
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6173
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6174
|
+
* </tr>
|
|
6175
|
+
* </table>
|
|
6176
|
+
*
|
|
6177
|
+
* For other coercion types or when the coercion type is not known at compile time, use the generic version of this method
|
|
6178
|
+
* and specify the type parameter explicitly.
|
|
6002
6179
|
*
|
|
6180
|
+
* @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types.
|
|
6181
|
+
* @param options Provides options for customizing what data is returned and how it is formatted.
|
|
6003
6182
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6004
6183
|
* The `value` property of the result is the data in the current selection.
|
|
6005
6184
|
* This is returned in the data structure or format you specified with the coercionType parameter.
|
|
@@ -6013,17 +6192,55 @@ declare namespace Office {
|
|
|
6013
6192
|
*
|
|
6014
6193
|
* **Requirement sets**:
|
|
6015
6194
|
*
|
|
6016
|
-
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#
|
|
6195
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6017
6196
|
*
|
|
6018
|
-
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#
|
|
6197
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion}
|
|
6019
6198
|
*
|
|
6020
|
-
*
|
|
6199
|
+
* **Supported applications**: Excel, PowerPoint, Project, Word
|
|
6200
|
+
*
|
|
6201
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6202
|
+
* the following information.
|
|
6203
|
+
*
|
|
6204
|
+
* <table>
|
|
6205
|
+
* <tr>
|
|
6206
|
+
* <th>Property</th>
|
|
6207
|
+
* <th>Use</th>
|
|
6208
|
+
* </tr>
|
|
6209
|
+
* <tr>
|
|
6210
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6211
|
+
* <td>Access the selected data as a string. If the selection does not contain text, returns an empty string.</td>
|
|
6212
|
+
* </tr>
|
|
6213
|
+
* <tr>
|
|
6214
|
+
* <td><code>AsyncResult.status</code></td>
|
|
6215
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
6216
|
+
* </tr>
|
|
6217
|
+
* <tr>
|
|
6218
|
+
* <td><code>AsyncResult.error</code></td>
|
|
6219
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6220
|
+
* </tr>
|
|
6221
|
+
* <tr>
|
|
6222
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6223
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6224
|
+
* </tr>
|
|
6225
|
+
* </table>
|
|
6226
|
+
*
|
|
6227
|
+
* @param coercionType Must be `Office.CoercionType.Text`.
|
|
6228
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6229
|
+
* The `value` property of the result is a string containing the selected text.
|
|
6230
|
+
*/
|
|
6231
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.Text, callback?: (result: AsyncResult<string>) => void): void;
|
|
6232
|
+
/**
|
|
6233
|
+
* Reads the data contained in the current selection in the document.
|
|
6234
|
+
*
|
|
6235
|
+
* @remarks
|
|
6236
|
+
*
|
|
6237
|
+
* **Requirement sets**:
|
|
6021
6238
|
*
|
|
6022
6239
|
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6023
6240
|
*
|
|
6024
|
-
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion}
|
|
6241
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion}
|
|
6025
6242
|
*
|
|
6026
|
-
*
|
|
6243
|
+
* **Supported applications**: Excel, Word
|
|
6027
6244
|
*
|
|
6028
6245
|
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6029
6246
|
* the following information.
|
|
@@ -6035,7 +6252,51 @@ declare namespace Office {
|
|
|
6035
6252
|
* </tr>
|
|
6036
6253
|
* <tr>
|
|
6037
6254
|
* <td><code>AsyncResult.value</code></td>
|
|
6038
|
-
* <td>
|
|
6255
|
+
* <td>Access the selected data as a {@link Office.TableData} object. Returns null if no table is selected.</td>
|
|
6256
|
+
* </tr>
|
|
6257
|
+
* <tr>
|
|
6258
|
+
* <td><code>AsyncResult.status</code></td>
|
|
6259
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
6260
|
+
* </tr>
|
|
6261
|
+
* <tr>
|
|
6262
|
+
* <td><code>AsyncResult.error</code></td>
|
|
6263
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6264
|
+
* </tr>
|
|
6265
|
+
* <tr>
|
|
6266
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6267
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6268
|
+
* </tr>
|
|
6269
|
+
* </table>
|
|
6270
|
+
*
|
|
6271
|
+
* @param coercionType Must be `Office.CoercionType.Table`.
|
|
6272
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6273
|
+
* The `value` property of the result is a {@link Office.TableData} object containing the data in the current selection.
|
|
6274
|
+
*/
|
|
6275
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.Table, callback?: (result: AsyncResult<TableData>) => void): void;
|
|
6276
|
+
/**
|
|
6277
|
+
* Reads the data contained in the current selection in the document.
|
|
6278
|
+
*
|
|
6279
|
+
* @remarks
|
|
6280
|
+
*
|
|
6281
|
+
* **Requirement sets**:
|
|
6282
|
+
*
|
|
6283
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6284
|
+
*
|
|
6285
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion}
|
|
6286
|
+
*
|
|
6287
|
+
* **Supported applications**: Excel, Word
|
|
6288
|
+
*
|
|
6289
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6290
|
+
* the following information.
|
|
6291
|
+
*
|
|
6292
|
+
* <table>
|
|
6293
|
+
* <tr>
|
|
6294
|
+
* <th>Property</th>
|
|
6295
|
+
* <th>Use</th>
|
|
6296
|
+
* </tr>
|
|
6297
|
+
* <tr>
|
|
6298
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6299
|
+
* <td>Access the selected data as an array of arrays. Returns an empty array if no data is selected.</td>
|
|
6039
6300
|
* </tr>
|
|
6040
6301
|
* <tr>
|
|
6041
6302
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -6051,6 +6312,70 @@ declare namespace Office {
|
|
|
6051
6312
|
* </tr>
|
|
6052
6313
|
* </table>
|
|
6053
6314
|
*
|
|
6315
|
+
* @param coercionType Must be `Office.CoercionType.Matrix`.
|
|
6316
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6317
|
+
* The `value` property of the result is an array of arrays containing the data in the current selection.
|
|
6318
|
+
*/
|
|
6319
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.Matrix, callback?: (result: AsyncResult<any[][]>) => void): void;
|
|
6320
|
+
/**
|
|
6321
|
+
* Reads the data contained in the current selection in the document.
|
|
6322
|
+
*
|
|
6323
|
+
* @remarks
|
|
6324
|
+
*
|
|
6325
|
+
* **Requirement set**: {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6326
|
+
*
|
|
6327
|
+
* **Supported application**: PowerPoint
|
|
6328
|
+
*
|
|
6329
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6330
|
+
* the following information.
|
|
6331
|
+
*
|
|
6332
|
+
* <table>
|
|
6333
|
+
* <tr>
|
|
6334
|
+
* <th>Property</th>
|
|
6335
|
+
* <th>Use</th>
|
|
6336
|
+
* </tr>
|
|
6337
|
+
* <tr>
|
|
6338
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6339
|
+
* <td>Access the selected slides as a {@link Office.SlideRange} object containing the IDs, titles, and indexes of the selected slides.</td>
|
|
6340
|
+
* </tr>
|
|
6341
|
+
* <tr>
|
|
6342
|
+
* <td><code>AsyncResult.status</code></td>
|
|
6343
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
6344
|
+
* </tr>
|
|
6345
|
+
* <tr>
|
|
6346
|
+
* <td><code>AsyncResult.error</code></td>
|
|
6347
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6348
|
+
* </tr>
|
|
6349
|
+
* <tr>
|
|
6350
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6351
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6352
|
+
* </tr>
|
|
6353
|
+
* </table>
|
|
6354
|
+
*
|
|
6355
|
+
* @param coercionType Must be `Office.CoercionType.SlideRange`.
|
|
6356
|
+
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6357
|
+
* The `value` property of the result is a {@link Office.SlideRange} object containing the selected slides.
|
|
6358
|
+
*/
|
|
6359
|
+
getSelectedDataAsync(coercionType: Office.CoercionType.SlideRange, callback?: (result: AsyncResult<SlideRange>) => void): void;
|
|
6360
|
+
/**
|
|
6361
|
+
* Reads the data contained in the current selection in the document.
|
|
6362
|
+
*
|
|
6363
|
+
* @remarks
|
|
6364
|
+
*
|
|
6365
|
+
* **Requirement sets**:
|
|
6366
|
+
*
|
|
6367
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#htmlcoercion | HtmlCoercion} (when using `Office.CoercionType.Html`)
|
|
6368
|
+
*
|
|
6369
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#matrixcoercion | MatrixCoercion} (when using `Office.CoercionType.Matrix`)
|
|
6370
|
+
*
|
|
6371
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#ooxmlcoercion | OoxmlCoercion} (when using `Office.CoercionType.Ooxml`)
|
|
6372
|
+
*
|
|
6373
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#selection | Selection}
|
|
6374
|
+
*
|
|
6375
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#tablecoercion | TableCoercion} (when using `Office.CoercionType.Table`)
|
|
6376
|
+
*
|
|
6377
|
+
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/office-add-in-requirement-sets#textcoercion | TextCoercion} (when using `Office.CoercionType.Text`)
|
|
6378
|
+
*
|
|
6054
6379
|
* The possible values for the {@link Office.CoercionType} parameter vary by the Office application.
|
|
6055
6380
|
*
|
|
6056
6381
|
* <table>
|
|
@@ -6088,6 +6413,35 @@ declare namespace Office {
|
|
|
6088
6413
|
* </tr>
|
|
6089
6414
|
* </table>
|
|
6090
6415
|
*
|
|
6416
|
+
* In the callback function that is passed to the getSelectedDataAsync method, you can use the properties of the AsyncResult object to return
|
|
6417
|
+
* the following information.
|
|
6418
|
+
*
|
|
6419
|
+
* <table>
|
|
6420
|
+
* <tr>
|
|
6421
|
+
* <th>Property</th>
|
|
6422
|
+
* <th>Use</th>
|
|
6423
|
+
* </tr>
|
|
6424
|
+
* <tr>
|
|
6425
|
+
* <td><code>AsyncResult.value</code></td>
|
|
6426
|
+
* <td>Access the selected data. The type depends on the coercionType parameter specified in the call.</td>
|
|
6427
|
+
* </tr>
|
|
6428
|
+
* <tr>
|
|
6429
|
+
* <td><code>AsyncResult.status</code></td>
|
|
6430
|
+
* <td>Determine the success or failure of the operation.</td>
|
|
6431
|
+
* </tr>
|
|
6432
|
+
* <tr>
|
|
6433
|
+
* <td><code>AsyncResult.error</code></td>
|
|
6434
|
+
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6435
|
+
* </tr>
|
|
6436
|
+
* <tr>
|
|
6437
|
+
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6438
|
+
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6439
|
+
* </tr>
|
|
6440
|
+
* </table>
|
|
6441
|
+
*
|
|
6442
|
+
* For other coercion types or when the coercion type is not known at compile time, use the generic version of this method
|
|
6443
|
+
* and specify the type parameter explicitly.
|
|
6444
|
+
*
|
|
6091
6445
|
* @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types.
|
|
6092
6446
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6093
6447
|
* The `value` property of the result is the data in the current selection.
|
|
@@ -8583,6 +8937,36 @@ declare namespace Office {
|
|
|
8583
8937
|
*/
|
|
8584
8938
|
rows: any[][];
|
|
8585
8939
|
}
|
|
8940
|
+
/**
|
|
8941
|
+
* Represents a single slide in a PowerPoint presentation.
|
|
8942
|
+
* This interface is used as part of the {@link Office.SlideRange} object returned by
|
|
8943
|
+
* {@link Office.Document.getSelectedDataAsync} when called with {@link Office.CoercionType.SlideRange}.
|
|
8944
|
+
*/
|
|
8945
|
+
interface Slide {
|
|
8946
|
+
/**
|
|
8947
|
+
* Gets the unique ID of the slide.
|
|
8948
|
+
*/
|
|
8949
|
+
id: number;
|
|
8950
|
+
/**
|
|
8951
|
+
* Gets the title of the slide.
|
|
8952
|
+
*/
|
|
8953
|
+
title: string;
|
|
8954
|
+
/**
|
|
8955
|
+
* Gets the 1-based index of the slide within the presentation.
|
|
8956
|
+
*/
|
|
8957
|
+
index: number;
|
|
8958
|
+
}
|
|
8959
|
+
/**
|
|
8960
|
+
* Represents the selected slides in a PowerPoint presentation.
|
|
8961
|
+
* This object is returned when calling {@link Office.Document.getSelectedDataAsync} with {@link Office.CoercionType.SlideRange} in PowerPoint.
|
|
8962
|
+
*
|
|
8963
|
+
*/
|
|
8964
|
+
interface SlideRange {
|
|
8965
|
+
/**
|
|
8966
|
+
* Gets an array of the selected slides.
|
|
8967
|
+
*/
|
|
8968
|
+
slides: Slide[];
|
|
8969
|
+
}
|
|
8586
8970
|
/**
|
|
8587
8971
|
* Provides methods to manage the task pane of an add-in.
|
|
8588
8972
|
*
|
|
@@ -16508,7 +16892,8 @@ declare namespace Office {
|
|
|
16508
16892
|
* **Important**:
|
|
16509
16893
|
*
|
|
16510
16894
|
* - The `from` and `sender` properties represent the same person unless the message is sent by a delegate with **Send on behalf** permissions.
|
|
16511
|
-
* In this case, the `from` property returns the
|
|
16895
|
+
* In this case, the `from` property returns the email address of the mailbox owner or shared mailbox, and the `sender` property returns the address of the delegate.
|
|
16896
|
+
* If the delegate has both **Send on behalf** and **Send as** permissions, the **Send as** permission applies. For information about mailbox delegation, see
|
|
16512
16897
|
* {@link https://learn.microsoft.com/exchange/recipients-in-exchange-online/manage-permissions-for-recipients | Manage permissions for recipients in Exchange Online}.
|
|
16513
16898
|
*
|
|
16514
16899
|
* - The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined.
|
|
@@ -16524,8 +16909,13 @@ declare namespace Office {
|
|
|
16524
16909
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
|
|
16525
16910
|
*
|
|
16526
16911
|
* **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case,
|
|
16527
|
-
* consider using
|
|
16528
|
-
*
|
|
16912
|
+
* consider using one of the following options depending on your Exchange environment.
|
|
16913
|
+
*
|
|
16914
|
+
* - For Exchange Online, use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/microsoft-graph | Microsoft Graph} to get the
|
|
16915
|
+
* {@link https://learn.microsoft.com/graph/api/resources/message | internetMessageId} property.
|
|
16916
|
+
*
|
|
16917
|
+
* - For Exchange Server (on-premises), use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get the
|
|
16918
|
+
* {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | InternetMessageId} property from the server.
|
|
16529
16919
|
*/
|
|
16530
16920
|
internetMessageId: string;
|
|
16531
16921
|
/**
|
|
@@ -16714,7 +17104,8 @@ declare namespace Office {
|
|
|
16714
17104
|
* **Important**:
|
|
16715
17105
|
*
|
|
16716
17106
|
* - The `from` and `sender` properties represent the same person unless the message is sent by a delegate with **Send on behalf** permissions.
|
|
16717
|
-
* In this case, the `from` property returns the
|
|
17107
|
+
* In this case, the `from` property returns the email address of the mailbox owner or shared mailbox, and the `sender` property returns the address of the delegate.
|
|
17108
|
+
* If the delegate has both **Send on behalf** and **Send as** permissions, the **Send as** permission applies. For information about mailbox delegation, see
|
|
16718
17109
|
* {@link https://learn.microsoft.com/exchange/recipients-in-exchange-online/manage-permissions-for-recipients | Manage permissions for recipients in Exchange Online}.
|
|
16719
17110
|
*
|
|
16720
17111
|
* - The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined.
|
|
@@ -20697,7 +21088,8 @@ declare namespace Office {
|
|
|
20697
21088
|
* **Important**:
|
|
20698
21089
|
*
|
|
20699
21090
|
* - The `from` and `sender` properties represent the same person unless the message is sent by a delegate with **Send on behalf** permissions.
|
|
20700
|
-
* In this case, the `from` property returns the
|
|
21091
|
+
* In this case, the `from` property returns the email address of the mailbox owner or shared mailbox, and the `sender` property returns the address of the delegate.
|
|
21092
|
+
* If the delegate has both **Send on behalf** and **Send as** permissions, the **Send as** permission applies. For information about mailbox delegation, see
|
|
20701
21093
|
* {@link https://learn.microsoft.com/exchange/recipients-in-exchange-online/manage-permissions-for-recipients | Manage permissions for recipients in Exchange Online}.
|
|
20702
21094
|
*
|
|
20703
21095
|
* - The `recipientType` property of the `EmailAddressDetails` object in the `from` property is undefined.
|
|
@@ -20706,15 +21098,20 @@ declare namespace Office {
|
|
|
20706
21098
|
/**
|
|
20707
21099
|
* Gets the internet message identifier for an email message.
|
|
20708
21100
|
*
|
|
20709
|
-
* **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case,
|
|
20710
|
-
* consider using {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get this
|
|
20711
|
-
* {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | property from the server}.
|
|
20712
|
-
*
|
|
20713
21101
|
* @remarks
|
|
20714
21102
|
*
|
|
20715
21103
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
|
|
20716
21104
|
*
|
|
20717
21105
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Read
|
|
21106
|
+
*
|
|
21107
|
+
* **Important**: In the **Sent Items** folder, the `internetMessageId` may not be available yet on recently sent items. In that case,
|
|
21108
|
+
* consider using one of the following options depending on your Exchange environment.
|
|
21109
|
+
*
|
|
21110
|
+
* - For Exchange Online, use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/microsoft-graph | Microsoft Graph} to get the
|
|
21111
|
+
* {@link https://learn.microsoft.com/graph/api/resources/message | internetMessageId} property.
|
|
21112
|
+
*
|
|
21113
|
+
* - For Exchange Server (on-premises), use {@link https://learn.microsoft.com/office/dev/add-ins/outlook/web-services | Exchange Web Services} to get the
|
|
21114
|
+
* {@link https://learn.microsoft.com/exchange/client-developer/web-service-reference/internetmessageid | InternetMessageId} property from the server.
|
|
20718
21115
|
*/
|
|
20719
21116
|
internetMessageId: string;
|
|
20720
21117
|
/**
|
|
@@ -20892,7 +21289,8 @@ declare namespace Office {
|
|
|
20892
21289
|
* **Important**:
|
|
20893
21290
|
*
|
|
20894
21291
|
* - The `from` and `sender` properties represent the same person unless the message is sent by a delegate with **Send on behalf** permissions.
|
|
20895
|
-
* In this case, the `from` property returns the
|
|
21292
|
+
* In this case, the `from` property returns the email address of the mailbox owner or shared mailbox, and the `sender` property returns the address of the delegate.
|
|
21293
|
+
* If the delegate has both **Send on behalf** and **Send as** permissions, the **Send as** permission applies. For information about mailbox delegation, see
|
|
20896
21294
|
* {@link https://learn.microsoft.com/exchange/recipients-in-exchange-online/manage-permissions-for-recipients | Manage permissions for recipients in Exchange Online}.
|
|
20897
21295
|
*
|
|
20898
21296
|
* - The `recipientType` property of the `EmailAddressDetails` object in the `sender` property is undefined.
|
|
@@ -22572,7 +22970,7 @@ declare namespace Office {
|
|
|
22572
22970
|
*
|
|
22573
22971
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
|
|
22574
22972
|
*
|
|
22575
|
-
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
22973
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
22576
22974
|
*
|
|
22577
22975
|
* @param options - An object literal that contains one or more of the following properties:-
|
|
22578
22976
|
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
|
|
@@ -22590,7 +22988,7 @@ declare namespace Office {
|
|
|
22590
22988
|
*
|
|
22591
22989
|
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
|
|
22592
22990
|
*
|
|
22593
|
-
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
22991
|
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
|
|
22594
22992
|
*
|
|
22595
22993
|
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
|
|
22596
22994
|
* `asyncResult`, which is an `Office.AsyncResult` object. The `value` property of the result is a `Recurrence` object.
|
office-js/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.568",
|
|
4
4
|
"description": "TypeScript definitions for office-js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,6 +46,6 @@
|
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {},
|
|
49
|
-
"typesPublisherContentHash": "
|
|
49
|
+
"typesPublisherContentHash": "e6a95f6b0aaed3283a97be625b29514cb658e8cf71bec53d9d55eb27807f5486",
|
|
50
50
|
"typeScriptVersion": "5.2"
|
|
51
51
|
}
|