@types/office-js 1.0.445 → 1.0.447

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 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: Fri, 15 Nov 2024 20:02:25 GMT
11
+ * Last updated: Tue, 19 Nov 2024 18:38:08 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
office-js/index.d.ts CHANGED
@@ -11778,6 +11778,8 @@ declare namespace Office {
11778
11778
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read item**
11779
11779
  *
11780
11780
  * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Appointment Attendee
11781
+ *
11782
+ * **Important**: In Outlook on the web and on Windows (new and classic), the appointment organizer is included in the object returned by the `requiredAttendees` property.
11781
11783
  */
11782
11784
  requiredAttendees: EmailAddressDetails[];
11783
11785
  /**
@@ -19158,6 +19160,9 @@ declare namespace Office {
19158
19160
  *
19159
19161
  * - Mac (new UI): No limit
19160
19162
  *
19163
+ * In classic Outlook on Windows, the appointment organizer is included in the object returned by the `getAsync` method when you create a new appointment or edit an
19164
+ * existing one. In Outlook on the web and new Outlook on Windows, the organizer is only included in the returned object when you edit an existing appointment.
19165
+ *
19161
19166
  * The `getAsync` method only returns recipients resolved by the Outlook client. A resolved recipient has the following characteristics.
19162
19167
  *
19163
19168
  * - If the recipient has a saved entry in the sender's address book, Outlook resolves the email address to the recipient's saved display name.
@@ -86309,10 +86314,11 @@ declare namespace Word {
86309
86314
  * [Api set: WordApi 1.1]
86310
86315
  *
86311
86316
  * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
86317
+ * `DropDownList` and `ComboBox` support was added in WordApi 1.9.
86312
86318
  *
86313
- * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'.
86319
+ * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'.
86314
86320
  */
86315
- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl;
86321
+ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl;
86316
86322
  /**
86317
86323
  * Inserts a document into the body at the specified location.
86318
86324
  *
@@ -87191,12 +87197,19 @@ declare namespace Word {
87191
87197
  /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
87192
87198
  context: RequestContext;
87193
87199
  /**
87194
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
87200
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
87195
87201
  *
87196
87202
  * @remarks
87197
87203
  * [Api set: WordApi 1.7]
87198
87204
  */
87199
87205
  readonly checkboxContentControl: Word.CheckboxContentControl;
87206
+ /**
87207
+ * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise.
87208
+ *
87209
+ * @remarks
87210
+ * [Api set: WordApi 1.9]
87211
+ */
87212
+ readonly comboBoxContentControl: Word.ComboBoxContentControl;
87200
87213
  /**
87201
87214
  * Gets the collection of content control objects in the content control.
87202
87215
  *
@@ -87204,6 +87217,13 @@ declare namespace Word {
87204
87217
  * [Api set: WordApi 1.1]
87205
87218
  */
87206
87219
  readonly contentControls: Word.ContentControlCollection;
87220
+ /**
87221
+ * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise.
87222
+ *
87223
+ * @remarks
87224
+ * [Api set: WordApi 1.9]
87225
+ */
87226
+ readonly dropDownListContentControl: Word.DropDownListContentControl;
87207
87227
  /**
87208
87228
  * Gets the collection of endnotes in the content control.
87209
87229
  *
@@ -87843,6 +87863,152 @@ declare namespace Word {
87843
87863
  */
87844
87864
  toJSON(): Word.Interfaces.ContentControlCollectionData;
87845
87865
  }
87866
+ /**
87867
+ * Represents a list item in a dropdown list or combo box content control.
87868
+ *
87869
+ * @remarks
87870
+ * [Api set: WordApi 1.9]
87871
+ */
87872
+ class ContentControlListItem extends OfficeExtension.ClientObject {
87873
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
87874
+ context: RequestContext;
87875
+ /**
87876
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
87877
+ *
87878
+ * @remarks
87879
+ * [Api set: WordApi 1.9]
87880
+ */
87881
+ displayText: string;
87882
+ /**
87883
+ * Specifies the index location of a content control list item in the collection of list items.
87884
+ *
87885
+ * @remarks
87886
+ * [Api set: WordApi 1.9]
87887
+ */
87888
+ index: number;
87889
+ /**
87890
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
87891
+ *
87892
+ * @remarks
87893
+ * [Api set: WordApi 1.9]
87894
+ */
87895
+ value: string;
87896
+ /**
87897
+ * Sets multiple properties of an object at the same time. You can pass either a plain object with the appropriate properties, or another API object of the same type.
87898
+ * @param properties A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called.
87899
+ * @param options Provides an option to suppress errors if the properties object tries to set any read-only properties.
87900
+ */
87901
+ set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void;
87902
+ /** Sets multiple properties on the object at the same time, based on an existing loaded object. */
87903
+ set(properties: Word.ContentControlListItem): void;
87904
+ /**
87905
+ * Deletes the list item.
87906
+ *
87907
+ * @remarks
87908
+ * [Api set: WordApi 1.9]
87909
+ */
87910
+ delete(): void;
87911
+ /**
87912
+ * Selects the list item and sets the text of the content control to the value of the list item.
87913
+ *
87914
+ * @remarks
87915
+ * [Api set: WordApi 1.9]
87916
+ */
87917
+ select(): void;
87918
+ /**
87919
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87920
+ *
87921
+ * @param options Provides options for which properties of the object to load.
87922
+ */
87923
+ load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem;
87924
+ /**
87925
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87926
+ *
87927
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
87928
+ */
87929
+ load(propertyNames?: string | string[]): Word.ContentControlListItem;
87930
+ /**
87931
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87932
+ *
87933
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
87934
+ */
87935
+ load(propertyNamesAndPaths?: {
87936
+ select?: string;
87937
+ expand?: string;
87938
+ }): Word.ContentControlListItem;
87939
+ /**
87940
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
87941
+ */
87942
+ track(): Word.ContentControlListItem;
87943
+ /**
87944
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
87945
+ */
87946
+ untrack(): Word.ContentControlListItem;
87947
+ /**
87948
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
87949
+ * Whereas the original `Word.ContentControlListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemData`) that contains shallow copies of any loaded child properties from the original object.
87950
+ */
87951
+ toJSON(): Word.Interfaces.ContentControlListItemData;
87952
+ }
87953
+ /**
87954
+ * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control.
87955
+ *
87956
+ * @remarks
87957
+ * [Api set: WordApi 1.9]
87958
+ */
87959
+ class ContentControlListItemCollection extends OfficeExtension.ClientObject {
87960
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
87961
+ context: RequestContext;
87962
+ /** Gets the loaded child items in this collection. */
87963
+ readonly items: Word.ContentControlListItem[];
87964
+ /**
87965
+ * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty.
87966
+ *
87967
+ * @remarks
87968
+ * [Api set: WordApi 1.9]
87969
+ */
87970
+ getFirst(): Word.ContentControlListItem;
87971
+ /**
87972
+ * Gets the first list item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`.
87973
+ For further information,
87974
+ see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}.
87975
+ *
87976
+ * @remarks
87977
+ * [Api set: WordApi 1.9]
87978
+ */
87979
+ getFirstOrNullObject(): Word.ContentControlListItem;
87980
+ /**
87981
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87982
+ *
87983
+ * @param options Provides options for which properties of the object to load.
87984
+ */
87985
+ load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection;
87986
+ /**
87987
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87988
+ *
87989
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
87990
+ */
87991
+ load(propertyNames?: string | string[]): Word.ContentControlListItemCollection;
87992
+ /**
87993
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
87994
+ *
87995
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
87996
+ */
87997
+ load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection;
87998
+ /**
87999
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
88000
+ */
88001
+ track(): Word.ContentControlListItemCollection;
88002
+ /**
88003
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
88004
+ */
88005
+ untrack(): Word.ContentControlListItemCollection;
88006
+ /**
88007
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
88008
+ * Whereas the original `Word.ContentControlListItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlListItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items.
88009
+ */
88010
+ toJSON(): Word.Interfaces.ContentControlListItemCollectionData;
88011
+ }
87846
88012
  /**
87847
88013
  * Specifies the options that define which content controls are returned.
87848
88014
  *
@@ -87851,12 +88017,13 @@ declare namespace Word {
87851
88017
  */
87852
88018
  interface ContentControlOptions {
87853
88019
  /**
87854
- * An array of content control types, item must be 'RichText', 'PlainText', or 'CheckBox'.
88020
+ * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'.
87855
88021
  *
87856
88022
  * @remarks
87857
88023
  * [Api set: WordApi 1.5]
87858
88024
  *
87859
- * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
88025
+ * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7.
88026
+ * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9.
87860
88027
  */
87861
88028
  types: Word.ContentControlType[];
87862
88029
  }
@@ -88689,9 +88856,24 @@ declare namespace Word {
88689
88856
  * @remarks
88690
88857
  * [Api set: WordApi 1.6]
88691
88858
  *
88859
+ * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
88860
+ *
88692
88861
  * @param stylesJson Required. A JSON-formatted string representing the styles.
88862
+ * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
88693
88863
  */
88694
- importStylesFromJson(stylesJson: string): OfficeExtension.ClientResult<string[]>;
88864
+ importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult<string[]>;
88865
+ /**
88866
+ * Import styles from a JSON-formatted string.
88867
+ *
88868
+ * @remarks
88869
+ * [Api set: WordApi 1.6]
88870
+ *
88871
+ * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1.
88872
+ *
88873
+ * @param stylesJson Required. A JSON-formatted string representing the styles.
88874
+ * @param importedStylesConflictBehavior Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document.
88875
+ */
88876
+ importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult<string[]>;
88695
88877
  /**
88696
88878
  * Inserts a document into the target document at a specific location with additional properties.
88697
88879
  Headers, footers, watermarks, and other section properties are copied by default.
@@ -89252,6 +89434,132 @@ declare namespace Word {
89252
89434
  */
89253
89435
  toJSON(): Word.Interfaces.DocumentPropertiesData;
89254
89436
  }
89437
+ /**
89438
+ * The data specific to content controls of type DropDownList.
89439
+ *
89440
+ * @remarks
89441
+ * [Api set: WordApi 1.9]
89442
+ */
89443
+ class DropDownListContentControl extends OfficeExtension.ClientObject {
89444
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
89445
+ context: RequestContext;
89446
+ /**
89447
+ * Gets the collection of list items in the dropdown list content control.
89448
+ *
89449
+ * @remarks
89450
+ * [Api set: WordApi 1.9]
89451
+ */
89452
+ readonly listItems: Word.ContentControlListItemCollection;
89453
+ /**
89454
+ * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object.
89455
+ *
89456
+ * @remarks
89457
+ * [Api set: WordApi 1.9]
89458
+ *
89459
+ * @param displayText Required. Display text of the list item.
89460
+ * @param value Optional. Value of the list item.
89461
+ * @param index Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list.
89462
+ */
89463
+ addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;
89464
+ /**
89465
+ * Deletes all list items in this dropdown list content control.
89466
+ *
89467
+ * @remarks
89468
+ * [Api set: WordApi 1.9]
89469
+ */
89470
+ deleteAllListItems(): void;
89471
+ /**
89472
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89473
+ *
89474
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
89475
+ */
89476
+ load(propertyNames?: string | string[]): Word.DropDownListContentControl;
89477
+ /**
89478
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89479
+ *
89480
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
89481
+ */
89482
+ load(propertyNamesAndPaths?: {
89483
+ select?: string;
89484
+ expand?: string;
89485
+ }): Word.DropDownListContentControl;
89486
+ /**
89487
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
89488
+ */
89489
+ track(): Word.DropDownListContentControl;
89490
+ /**
89491
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
89492
+ */
89493
+ untrack(): Word.DropDownListContentControl;
89494
+ /**
89495
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
89496
+ * Whereas the original `Word.DropDownListContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DropDownListContentControlData`) that contains shallow copies of any loaded child properties from the original object.
89497
+ */
89498
+ toJSON(): Word.Interfaces.DropDownListContentControlData;
89499
+ }
89500
+ /**
89501
+ * The data specific to content controls of type 'ComboBox'.
89502
+ *
89503
+ * @remarks
89504
+ * [Api set: WordApi 1.9]
89505
+ */
89506
+ class ComboBoxContentControl extends OfficeExtension.ClientObject {
89507
+ /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
89508
+ context: RequestContext;
89509
+ /**
89510
+ * Gets the collection of list items in the combo box content control.
89511
+ *
89512
+ * @remarks
89513
+ * [Api set: WordApi 1.9]
89514
+ */
89515
+ readonly listItems: Word.ContentControlListItemCollection;
89516
+ /**
89517
+ * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object.
89518
+ *
89519
+ * @remarks
89520
+ * [Api set: WordApi 1.9]
89521
+ *
89522
+ * @param displayText Required. Display text of the list item.
89523
+ * @param value Optional. Value of the list item.
89524
+ * @param index Optional. Index location of the new item in the list. If an item exists at the position specified, the existing item is pushed down in the list. If omitted, the new item is added to the end of the list.
89525
+ */
89526
+ addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem;
89527
+ /**
89528
+ * Deletes all list items in this combo box content control.
89529
+ *
89530
+ * @remarks
89531
+ * [Api set: WordApi 1.9]
89532
+ */
89533
+ deleteAllListItems(): void;
89534
+ /**
89535
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89536
+ *
89537
+ * @param propertyNames A comma-delimited string or an array of strings that specify the properties to load.
89538
+ */
89539
+ load(propertyNames?: string | string[]): Word.ComboBoxContentControl;
89540
+ /**
89541
+ * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties.
89542
+ *
89543
+ * @param propertyNamesAndPaths `propertyNamesAndPaths.select` is a comma-delimited string that specifies the properties to load, and `propertyNamesAndPaths.expand` is a comma-delimited string that specifies the navigation properties to load.
89544
+ */
89545
+ load(propertyNamesAndPaths?: {
89546
+ select?: string;
89547
+ expand?: string;
89548
+ }): Word.ComboBoxContentControl;
89549
+ /**
89550
+ * Track the object for automatic adjustment based on surrounding changes in the document. This call is a shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.add(thisObject)}. If you're using this object across `.sync` calls and outside the sequential execution of a ".run" batch, and get an "InvalidObjectPath" error when setting a property or invoking a method on the object, you need to add the object to the tracked object collection when the object was first created. If this object is part of a collection, you should also track the parent collection.
89551
+ */
89552
+ track(): Word.ComboBoxContentControl;
89553
+ /**
89554
+ * Release the memory associated with this object, if it has previously been tracked. This call is shorthand for {@link https://learn.microsoft.com/javascript/api/office/officeextension.clientrequestcontext#office-officeextension-clientrequestcontext-trackedobjects-member | context.trackedObjects.remove(thisObject)}. Having many tracked objects slows down the host application, so please remember to free any objects you add, once you're done using them. You will need to call `context.sync()` before the memory release takes effect.
89555
+ */
89556
+ untrack(): Word.ComboBoxContentControl;
89557
+ /**
89558
+ * Overrides the JavaScript `toJSON()` method in order to provide more useful output when an API object is passed to `JSON.stringify()`. (`JSON.stringify`, in turn, calls the `toJSON` method of the object that is passed to it.)
89559
+ * Whereas the original `Word.ComboBoxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ComboBoxContentControlData`) that contains shallow copies of any loaded child properties from the original object.
89560
+ */
89561
+ toJSON(): Word.Interfaces.ComboBoxContentControlData;
89562
+ }
89255
89563
  /**
89256
89564
  * Represents a field.
89257
89565
  *
@@ -91249,10 +91557,11 @@ declare namespace Word {
91249
91557
  * [Api set: WordApi 1.1]
91250
91558
  *
91251
91559
  * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
91560
+ * `DropDownList` and `ComboBox` support was added in WordApi 1.9.
91252
91561
  *
91253
- * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'.
91562
+ * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'.
91254
91563
  */
91255
- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl;
91564
+ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl;
91256
91565
  /**
91257
91566
  * Inserts a document into the paragraph at the specified location.
91258
91567
  *
@@ -92006,10 +92315,11 @@ declare namespace Word {
92006
92315
  * [Api set: WordApi 1.1]
92007
92316
  *
92008
92317
  * Note: The `contentControlType` parameter was introduced in WordApi 1.5. `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
92318
+ * `DropDownList` and `ComboBox` support was added in WordApi 1.9.
92009
92319
  *
92010
- * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', or 'CheckBox'. The default is 'RichText'.
92320
+ * @param contentControlType Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'.
92011
92321
  */
92012
- insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | "RichText" | "PlainText" | "CheckBox"): Word.ContentControl;
92322
+ insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl;
92013
92323
  /**
92014
92324
  * Inserts an endnote. The endnote reference is placed after the range.
92015
92325
  *
@@ -98543,6 +98853,32 @@ declare namespace Word {
98543
98853
  */
98544
98854
  compareTargetNew = "CompareTargetNew",
98545
98855
  }
98856
+ /**
98857
+ * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document.
98858
+ *
98859
+ * @remarks
98860
+ * [Api set: WordApiDesktop 1.1]
98861
+ */
98862
+ enum ImportedStylesConflictBehavior {
98863
+ /**
98864
+ * Ignore conflicting imported styles and keep the existing version of those styles in the current document.
98865
+ * @remarks
98866
+ * [Api set: WordApiDesktop 1.1]
98867
+ */
98868
+ ignore = "Ignore",
98869
+ /**
98870
+ * Overwrite the existing styles in the current document.
98871
+ * @remarks
98872
+ * [Api set: WordApiDesktop 1.1]
98873
+ */
98874
+ overwrite = "Overwrite",
98875
+ /**
98876
+ * Rename conflicting imported styles so that both versions are kept in the current document. For example, if MyStyle already exists in the document, then the imported version could be added as MyStyle1.
98877
+ * @remarks
98878
+ * [Api set: WordApiDesktop 1.1]
98879
+ */
98880
+ createNew = "CreateNew",
98881
+ }
98546
98882
  enum ErrorCodes {
98547
98883
  accessDenied = "AccessDenied",
98548
98884
  generalException = "GeneralException",
@@ -98779,7 +99115,7 @@ declare namespace Word {
98779
99115
  /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */
98780
99116
  interface ContentControlUpdateData {
98781
99117
  /**
98782
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
99118
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
98783
99119
  *
98784
99120
  * @remarks
98785
99121
  * [Api set: WordApi 1.7]
@@ -98867,6 +99203,34 @@ declare namespace Word {
98867
99203
  interface ContentControlCollectionUpdateData {
98868
99204
  items?: Word.Interfaces.ContentControlData[];
98869
99205
  }
99206
+ /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */
99207
+ interface ContentControlListItemUpdateData {
99208
+ /**
99209
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
99210
+ *
99211
+ * @remarks
99212
+ * [Api set: WordApi 1.9]
99213
+ */
99214
+ displayText?: string;
99215
+ /**
99216
+ * Specifies the index location of a content control list item in the collection of list items.
99217
+ *
99218
+ * @remarks
99219
+ * [Api set: WordApi 1.9]
99220
+ */
99221
+ index?: number;
99222
+ /**
99223
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
99224
+ *
99225
+ * @remarks
99226
+ * [Api set: WordApi 1.9]
99227
+ */
99228
+ value?: string;
99229
+ }
99230
+ /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */
99231
+ interface ContentControlListItemCollectionUpdateData {
99232
+ items?: Word.Interfaces.ContentControlListItemData[];
99233
+ }
98870
99234
  /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */
98871
99235
  interface CustomPropertyUpdateData {
98872
99236
  /**
@@ -100374,12 +100738,19 @@ declare namespace Word {
100374
100738
  /** An interface describing the data returned by calling `contentControl.toJSON()`. */
100375
100739
  interface ContentControlData {
100376
100740
  /**
100377
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
100741
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
100378
100742
  *
100379
100743
  * @remarks
100380
100744
  * [Api set: WordApi 1.7]
100381
100745
  */
100382
100746
  checkboxContentControl?: Word.Interfaces.CheckboxContentControlData;
100747
+ /**
100748
+ * Gets the data of the content control when its type is 'ComboBox'. It's `null` otherwise.
100749
+ *
100750
+ * @remarks
100751
+ * [Api set: WordApi 1.9]
100752
+ */
100753
+ comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData;
100383
100754
  /**
100384
100755
  * Gets the collection of content control objects in the content control.
100385
100756
  *
@@ -100387,6 +100758,13 @@ declare namespace Word {
100387
100758
  * [Api set: WordApi 1.1]
100388
100759
  */
100389
100760
  contentControls?: Word.Interfaces.ContentControlData[];
100761
+ /**
100762
+ * Gets the data of the content control when its type is 'DropDownList'. It's `null` otherwise.
100763
+ *
100764
+ * @remarks
100765
+ * [Api set: WordApi 1.9]
100766
+ */
100767
+ dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData;
100390
100768
  /**
100391
100769
  * Gets the collection of field objects in the content control.
100392
100770
  *
@@ -100534,6 +100912,34 @@ declare namespace Word {
100534
100912
  interface ContentControlCollectionData {
100535
100913
  items?: Word.Interfaces.ContentControlData[];
100536
100914
  }
100915
+ /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */
100916
+ interface ContentControlListItemData {
100917
+ /**
100918
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
100919
+ *
100920
+ * @remarks
100921
+ * [Api set: WordApi 1.9]
100922
+ */
100923
+ displayText?: string;
100924
+ /**
100925
+ * Specifies the index location of a content control list item in the collection of list items.
100926
+ *
100927
+ * @remarks
100928
+ * [Api set: WordApi 1.9]
100929
+ */
100930
+ index?: number;
100931
+ /**
100932
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
100933
+ *
100934
+ * @remarks
100935
+ * [Api set: WordApi 1.9]
100936
+ */
100937
+ value?: string;
100938
+ }
100939
+ /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */
100940
+ interface ContentControlListItemCollectionData {
100941
+ items?: Word.Interfaces.ContentControlListItemData[];
100942
+ }
100537
100943
  /** An interface describing the data returned by calling `customProperty.toJSON()`. */
100538
100944
  interface CustomPropertyData {
100539
100945
  /**
@@ -100827,6 +101233,12 @@ declare namespace Word {
100827
101233
  */
100828
101234
  title?: string;
100829
101235
  }
101236
+ /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */
101237
+ interface DropDownListContentControlData {
101238
+ }
101239
+ /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */
101240
+ interface ComboBoxContentControlData {
101241
+ }
100830
101242
  /** An interface describing the data returned by calling `field.toJSON()`. */
100831
101243
  interface FieldData {
100832
101244
  /**
@@ -102803,7 +103215,7 @@ declare namespace Word {
102803
103215
  */
102804
103216
  $all?: boolean;
102805
103217
  /**
102806
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
103218
+ * Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
102807
103219
  *
102808
103220
  * @remarks
102809
103221
  * [Api set: WordApi 1.7]
@@ -102976,7 +103388,7 @@ declare namespace Word {
102976
103388
  */
102977
103389
  $all?: boolean;
102978
103390
  /**
102979
- * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
103391
+ * For EACH ITEM in the collection: Gets the data of the content control when its type is 'CheckBox'. It's `null` otherwise.
102980
103392
  *
102981
103393
  * @remarks
102982
103394
  * [Api set: WordApi 1.7]
@@ -103137,6 +103549,72 @@ declare namespace Word {
103137
103549
  */
103138
103550
  type?: boolean;
103139
103551
  }
103552
+ /**
103553
+ * Represents a list item in a dropdown list or combo box content control.
103554
+ *
103555
+ * @remarks
103556
+ * [Api set: WordApi 1.9]
103557
+ */
103558
+ interface ContentControlListItemLoadOptions {
103559
+ /**
103560
+ Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`).
103561
+ */
103562
+ $all?: boolean;
103563
+ /**
103564
+ * Specifies the display text of a list item for a dropdown list or combo box content control.
103565
+ *
103566
+ * @remarks
103567
+ * [Api set: WordApi 1.9]
103568
+ */
103569
+ displayText?: boolean;
103570
+ /**
103571
+ * Specifies the index location of a content control list item in the collection of list items.
103572
+ *
103573
+ * @remarks
103574
+ * [Api set: WordApi 1.9]
103575
+ */
103576
+ index?: boolean;
103577
+ /**
103578
+ * Specifies the programmatic value of a list item for a dropdown list or combo box content control.
103579
+ *
103580
+ * @remarks
103581
+ * [Api set: WordApi 1.9]
103582
+ */
103583
+ value?: boolean;
103584
+ }
103585
+ /**
103586
+ * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control.
103587
+ *
103588
+ * @remarks
103589
+ * [Api set: WordApi 1.9]
103590
+ */
103591
+ interface ContentControlListItemCollectionLoadOptions {
103592
+ /**
103593
+ Specifying `$all` for the load options loads all the scalar properties (such as `Range.address`) but not the navigational properties (such as `Range.format.fill.color`).
103594
+ */
103595
+ $all?: boolean;
103596
+ /**
103597
+ * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control.
103598
+ *
103599
+ * @remarks
103600
+ * [Api set: WordApi 1.9]
103601
+ */
103602
+ displayText?: boolean;
103603
+ /**
103604
+ * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items.
103605
+ *
103606
+ * @remarks
103607
+ * [Api set: WordApi 1.9]
103608
+ */
103609
+ index?: boolean;
103610
+ /**
103611
+ * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control.
103612
+ *
103613
+ * @remarks
103614
+ * [Api set: WordApi 1.9]
103615
+ */
103616
+ value?: boolean;
103617
+ }
103140
103618
  /**
103141
103619
  * Represents a custom property.
103142
103620
  *
office-js/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js",
3
- "version": "1.0.445",
3
+ "version": "1.0.447",
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": "b79a3de09801ea6d6c836b8ecc473785a3a91ea3f29c23e0e50d882c046f5d6b",
49
+ "typesPublisherContentHash": "399996e9f6742b2a3843d349365e7d2f44843f68f8d3fa315676a29655edda7e",
50
50
  "typeScriptVersion": "4.9"
51
51
  }