diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop1.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop1.d.ts deleted file mode 100644 index 4883631c12..0000000000 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop1.d.ts +++ /dev/null @@ -1,27522 +0,0 @@ -import { OfficeExtension } from "../../api-extractor-inputs-office/office" -import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" -//////////////////////////////////////////////////////////////// -/////////////////////// Begin Word APIs //////////////////////// -//////////////////////////////////////////////////////////////// - -export declare namespace Word { - /** - * Represents the color scheme of a critique in the document, affecting underline and highlight. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum CritiqueColorScheme { - /** - * Red color. - * @remarks - * [Api set: WordApi 1.7] - */ - red = "Red", - /** - * Green color. - * @remarks - * [Api set: WordApi 1.7] - */ - green = "Green", - /** - * Blue color. - * @remarks - * [Api set: WordApi 1.7] - */ - blue = "Blue", - /** - * Lavender color. - * @remarks - * [Api set: WordApi 1.7] - */ - lavender = "Lavender", - /** - * Berry color. - * @remarks - * [Api set: WordApi 1.7] - */ - berry = "Berry", - } - /** - * Properties defining the behavior of the pop-up menu for a given critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface CritiquePopupOptions { - /** - * Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in icon in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - brandingTextResourceId: string; - /** - * Gets the manifest resource ID of the string to use as the subtitle. - * - * @remarks - * [Api set: WordApi 1.8] - */ - subtitleResourceId: string; - /** - * Gets the suggestions to display in the critique pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - suggestions: string[]; - /** - * Gets the manifest resource ID of the string to use as the title. - * - * @remarks - * [Api set: WordApi 1.8] - */ - titleResourceId: string; - } - /** - * Critique that will be rendered as underline for the specified part of paragraph in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface Critique { - /** - * Specifies the color scheme of the critique. - * - * @remarks - * [Api set: WordApi 1.7] - */ - colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; - /** - * Specifies the length of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - length: number; - /** - * Specifies the behavior of the pop-up menu for the critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - popupOptions?: Word.CritiquePopupOptions; - /** - * Specifies the start index of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - start: number; - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CritiqueAnnotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly range: Word.Range; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critique: Word.Critique; - /** - * Accepts the critique. This will change the annotation state to `accepted`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - accept(): void; - /** - * Rejects the critique. This will change the annotation state to `rejected`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CritiqueAnnotation; - /** - * 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. - */ - track(): Word.CritiqueAnnotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CritiqueAnnotation; - /** - * 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's passed to it.) - * Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CritiqueAnnotationData; - } - /** - * Represents the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum AnnotationState { - /** - * Created. - * @remarks - * [Api set: WordApi 1.7] - */ - created = "Created", - /** - * Accepted. - * @remarks - * [Api set: WordApi 1.7] - */ - accepted = "Accepted", - /** - * Rejected. - * @remarks - * [Api set: WordApi 1.7] - */ - rejected = "Rejected", - } - /** - * Annotations set produced by the add-in. Currently supporting only critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationSet { - /** - * Critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiques: Word.Critique[]; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class Annotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critiqueAnnotation: Word.CritiqueAnnotation; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly id: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - /** - * Deletes the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Annotation; - /** - * 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. - */ - track(): Word.Annotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Annotation; - /** - * 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's passed to it.) - * Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.AnnotationData; - } - /** - * Holds annotation information that is passed back on annotation added event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationInsertedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation inserted event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationClickedEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Holds annotation information that is passed back on annotation removed event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationRemovedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation hovered event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationHoveredEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Represents action information that's passed back on annotation pop-up action event. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface AnnotationPopupActionEventArgs { - /** - * Specifies the chosen action in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - action: string; - /** - * Specifies the accepted suggestion (only populated when accepting a critique suggestion). - * - * @remarks - * [Api set: WordApi 1.8] - */ - critiqueSuggestion: string; - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.8] - */ - id: string; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class AnnotationCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Annotation[]; - /** - * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirst(): Word.Annotation; - /** - * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. - For further information, - see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirstOrNullObject(): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; - /** - * 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. - */ - track(): Word.AnnotationCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.AnnotationCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.AnnotationCollectionData; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Application extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Application): void; - /** - * Creates a new document by using an optional Base64-encoded .docx file. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param base64File - Optional. The Base64-encoded .docx file. The default value is null. - */ - createDocument(base64File?: string): Word.DocumentCreated; - /** - * Opens a document and displays it in a new tab or window. - The following are examples for the various supported clients and platforms. - - - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` - - - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` - - - Local location example for Mac and iOS: `/User/someone/document.docx` - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param filePath - Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. - */ - openDocument(filePath: string): void; - /** - * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param base64File - Required. The template file. - */ - retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ApplicationLoadOptions): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Application; - /** - * Create a new instance of the `Word.Application` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; - /** - * 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's passed to it.) - * Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ApplicationData; - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Body extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBodyOrNullObject: Word.Body; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSection: Word.Section; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSectionOrNullObject: Word.Section; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Body): void; - /** - * Clears the contents of the body object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Gets comments associated with the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the body. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the OOXML (Office Open XML) representation of the body object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole body, or the starting or ending point of the body, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the collection of the TrackedChange objects in the body. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; - /** - * Wraps the Body object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the document. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; - /** - * Inserts text into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. Can be a maximum of 255 characters. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Body; - /** - * 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. - */ - track(): Word.Body; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Body; - /** - * 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's passed to it.) - * Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BodyData; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class Border extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly location: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Border): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderLoadOptions): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Border; - /** - * 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. - */ - track(): Word.Border; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Border; - /** - * 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's passed to it.) - * Whereas the original `Word.Border` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BorderData; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class BorderCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Border[]; - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Gets the border that has the specified location. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getByLocation(borderLocation: Word.BorderLocation.top | Word.BorderLocation.left | Word.BorderLocation.bottom | Word.BorderLocation.right | Word.BorderLocation.insideHorizontal | Word.BorderLocation.insideVertical | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical"): Word.Border; - /** - * Gets the first border in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.Border; - /** - * Gets the first border in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.Border; - /** - * Gets a Border object by its index in the collection. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param index - A number that identifies the index location of a Border object. - */ - getItem(index: number): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.BorderCollection; - /** - * 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. - */ - track(): Word.BorderCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.BorderCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.BorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.BorderCollectionData; - } - - - - - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CheckboxContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CheckboxContentControl): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CheckboxContentControl; - /** - * 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. - */ - track(): Word.CheckboxContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CheckboxContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CheckboxContentControlData; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Comment extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly replies: Word.CommentReplyCollection; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Comment): void; - /** - * Deletes the comment and its replies. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Gets the range in the main document where the comment is on. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getRange(): Word.Range; - /** - * Adds a new reply to the end of the comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param replyText - Required. Reply text. - */ - reply(replyText: string): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Comment; - /** - * 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. - */ - track(): Word.Comment; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Comment; - /** - * 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's passed to it.) - * Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentData; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Comment[]; - /** - * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Comment; - /** - * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; - /** - * 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. - */ - track(): Word.CommentCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentCollectionData; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentContentRange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly isEmpty: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly text: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentContentRange): void; - /** - * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param text - Required. The text to be inserted in to the CommentContentRange. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentContentRange; - /** - * 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. - */ - track(): Word.CommentContentRange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentContentRange; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentContentRangeData; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReply extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentComment: Word.Comment; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentReply): void; - /** - * Deletes the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentReply; - /** - * 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. - */ - track(): Word.CommentReply; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReply; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentReplyData; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReplyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CommentReply[]; - /** - * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.CommentReply; - /** - * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; - /** - * 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. - */ - track(): Word.CommentReplyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReplyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentReplyCollectionData; - } - - - - - - - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly checkboxContentControl: Word.CheckboxContentControl; - /** - * Gets the data of the content control when its type is `ComboBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.9] - */ - readonly comboBoxContentControl: Word.ComboBoxContentControl; - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - - /** - * Gets the data of the content control when its type is `DropDownList`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.9] - */ - readonly dropDownListContentControl: Word.DropDownListContentControl; - /** - * Gets the collection of endnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly id: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ContentControl): void; - /** - * Clears the contents of the content control. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param keepContent - Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. - */ - delete(keepContent: boolean): void; - /** - * Gets comments associated with the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported child content controls in this content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the Office Open XML (OOXML) representation of the content control object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole content control, or the starting or ending point of the content control, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the content control. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. Type of break. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; - /** - * Inserts a document into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts an inline picture into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns into, or next to, a content control. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. The text to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the content control into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ContentControl; - /** - * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDataChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDeleted: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is entered. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onEntered: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is exited, for example, when the cursor leaves the content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onExited: OfficeExtension.EventHandlers; - /** - * Occurs when selection within the content control is changed. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onSelectionChanged: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.ContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ContentControlData; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControlCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ContentControl[]; - /** - * Gets the content controls that have the specified tracking state. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param changeTrackingStates - Required. An array of content control change tracking states. - */ - getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; - /** - * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - Required. A content control identifier. - */ - getById(id: number): Word.ContentControl; - /** - * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A content control identifier. - */ - getByIdOrNullObject(id: number): Word.ContentControl; - /** - * Gets the content controls that have the specified tag. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param tag - Required. A tag set on a content control. - */ - getByTag(tag: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified title. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param title - Required. The title of a content control. - */ - getByTitle(title: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified types. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param types - Required. An array of content control types. - */ - getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; - /** - * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.ContentControl; - /** - * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.ContentControl; - /** - * Gets a content control by its ID. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - The content control's ID. - */ - getItem(id: number): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; - /** - * 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. - */ - track(): Word.ContentControlCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControlCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ContentControlCollectionData; - } - /** - * Represents a list item in a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - export class ContentControlListItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the display text of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - displayText: string; - /** - * Specifies the index location of a content control list item in the collection of list items. - * - * @remarks - * [Api set: WordApi 1.9] - */ - index: number; - /** - * Specifies the programmatic value of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - value: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ContentControlListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ContentControlListItem): void; - /** - * Deletes the list item. - * - * @remarks - * [Api set: WordApi 1.9] - */ - delete(): void; - /** - * Selects the list item and sets the text of the content control to the value of the list item. - * - * @remarks - * [Api set: WordApi 1.9] - */ - select(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlListItemLoadOptions): Word.ContentControlListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControlListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ContentControlListItem; - /** - * 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. - */ - track(): Word.ContentControlListItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControlListItem; - /** - * 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's passed to it.) - * 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. - */ - toJSON(): Word.Interfaces.ContentControlListItemData; - } - /** - * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - export class ContentControlListItemCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ContentControlListItem[]; - /** - * Gets the first list item in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.9] - */ - getFirst(): Word.ContentControlListItem; - /** - * 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`. - For further information, - see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.9] - */ - getFirstOrNullObject(): Word.ContentControlListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlListItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlListItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControlListItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlListItemCollection; - /** - * 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. - */ - track(): Word.ContentControlListItemCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControlListItemCollection; - /** - * 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's passed to it.) - * 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. - */ - toJSON(): Word.Interfaces.ContentControlListItemCollectionData; - } - /** - * Specifies the options that define which content controls are returned. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlOptions { - /** - * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. - * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. - */ - types: Word.ContentControlType[]; - } - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomProperty extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly key: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomProperty): void; - /** - * Deletes the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomProperty; - /** - * 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. - */ - track(): Word.CustomProperty; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomProperty; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomPropertyData; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomPropertyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomProperty[]; - /** - * Creates a new or sets an existing custom property. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The custom property's key, which is case-insensitive. - * @param value - Required. The custom property's value. - */ - add(key: string, value: any): Word.CustomProperty; - /** - * Deletes all custom properties in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteAll(): void; - /** - * Gets the count of custom properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - The key that identifies the custom property object. - */ - getItem(key: string): Word.CustomProperty; - /** - * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The key that identifies the custom property object. - */ - getItemOrNullObject(key: string): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; - /** - * 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. - */ - track(): Word.CustomPropertyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomPropertyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomPropertyCollectionData; - } - - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPart extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly namespaceUri: string; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomXmlPartUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomXmlPart): void; - - /** - * Deletes the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Deletes an attribute with the given name from the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - */ - deleteAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string): void; - /** - * Deletes the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - deleteElement(xpath: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Gets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getXml(): OfficeExtension.ClientResult; - /** - * Inserts an attribute with the given name and value to the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. Value of the attribute. - */ - insertAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Inserts the given XML under the parent element identified by xpath at child position index. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single parent element in XPath notation. - * @param xml - Required. XML content to be inserted. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param index - Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. - */ - insertElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }, index?: number): void; - - /** - * Queries the XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. An XPath query. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @returns An array where each item represents an entry matched by the XPath query. - */ - query(xpath: string, namespaceMappings: { - [key: string]: string; - }): OfficeExtension.ClientResult; - - - /** - * Sets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content to be set. - */ - setXml(xml: string): void; - /** - * Updates the value of an attribute with the given name of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. New value of the attribute. - */ - updateAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Updates the XML of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param xml - Required. New XML content to be stored. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - updateElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomXmlPart; - /** - * 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. - */ - track(): Word.CustomXmlPart; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPart; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomXmlPartData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Adds a new custom XML part to the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content. Must be a valid XML fragment. - */ - add(xml: string): Word.CustomXmlPart; - /** - * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param namespaceUri - Required. The namespace URI. - */ - getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID or index of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartCollectionData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItem(): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItemOrNullObject(): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartScopedCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartScopedCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Document extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activeWindow: Word.Window; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly windows: Word.WindowCollection; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Document): void; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: Word.StyleType): Word.Style; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: Word.CloseBehavior): void; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: "Save" | "SkipSave"): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param filePath - Required. The path of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specifies the behavior of comparing document. - */ - compare(filePath: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64File - Required. The Base64-encoded content of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specify the behavior for comparing the documents. Note that the `compareTarget` option isn't allowed to be `CompareTargetSelected` in this API. - */ - compareFromBase64(base64File: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - - /** - * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param id - The ID of the annotation to get. - */ - getAnnotationById(id: string): Word.Annotation; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - /** - * Gets the currently supported content controls in the document. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets the document's endnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getEndnoteBody(): Word.Body; - /** - * Gets the document's footnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFootnoteBody(): Word.Body; - /** - * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param id - Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. - */ - getParagraphByUniqueLocalId(id: string): Word.Paragraph; - /** - * Gets the current selection of the document. Multiple selections aren't supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getSelection(): Word.Range; - /** - * Gets a StyleCollection object that represents the whole style set of the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getStyles(): Word.StyleCollection; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; - /** - * Inserts a document into the target document at a specific location with additional properties. - Headers, footers, watermarks, and other section properties are copied by default. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; - - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Document; - /** - * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationClicked: OfficeExtension.EventHandlers; - /** - * Occurs when the user hovers the cursor over an annotation. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationHovered: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationInserted: OfficeExtension.EventHandlers; - /** - * Occurs when the user performs an action in an annotation pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - * - * @eventproperty - */ - readonly onAnnotationPopupAction: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationRemoved: OfficeExtension.EventHandlers; - /** - * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onContentControlAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds new paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user changes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphDeleted: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.Document; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Document; - /** - * 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's passed to it.) - * Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentData; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentCreated extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentCreated): void; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: Word.StyleType): Word.Style; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - /** - * Gets the currently supported content controls in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets a StyleCollection object that represents the whole style set of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - */ - getStyles(): Word.StyleCollection; - /** - * Inserts a document into the target document at a specific location with additional properties. - Headers, footers, watermarks, and other section properties are copied by default. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; - /** - * Opens the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - open(): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentCreated; - /** - * 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. - */ - track(): Word.DocumentCreated; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentCreated; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentCreatedData; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentProperties extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly customProperties: Word.CustomPropertyCollection; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly applicationName: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly creationDate: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastAuthor: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastPrintDate: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastSaveTime: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly revisionNumber: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly security: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly template: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentProperties): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentProperties; - /** - * 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. - */ - track(): Word.DocumentProperties; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentProperties; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentPropertiesData; - } - /** - * The data specific to content controls of type DropDownList. - * - * @remarks - * [Api set: WordApi 1.9] - */ - export class DropDownListContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of list items in the dropdown list content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - readonly listItems: Word.ContentControlListItemCollection; - /** - * Adds a new list item to this dropdown list content control and returns a {@link Word.ContentControlListItem} object. - * - * @remarks - * [Api set: WordApi 1.9] - * - * @param displayText - Required. Display text of the list item. - * @param value - Optional. Value of the list item. - * @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. - */ - addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; - /** - * Deletes all list items in this dropdown list content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - deleteAllListItems(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DropDownListContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DropDownListContentControl; - /** - * 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. - */ - track(): Word.DropDownListContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DropDownListContentControl; - /** - * 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's passed to it.) - * 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. - */ - toJSON(): Word.Interfaces.DropDownListContentControlData; - } - /** - * The data specific to content controls of type 'ComboBox'. - * - * @remarks - * [Api set: WordApi 1.9] - */ - export class ComboBoxContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of list items in the combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - readonly listItems: Word.ContentControlListItemCollection; - /** - * Adds a new list item to this combo box content control and returns a {@link Word.ContentControlListItem} object. - * - * @remarks - * [Api set: WordApi 1.9] - * - * @param displayText - Required. Display text of the list item. - * @param value - Optional. Value of the list item. - * @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. - */ - addListItem(displayText: string, value?: string, index?: number): Word.ContentControlListItem; - /** - * Deletes all list items in this combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - deleteAllListItems(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ComboBoxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ComboBoxContentControl; - /** - * 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. - */ - track(): Word.ComboBoxContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ComboBoxContentControl; - /** - * 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's passed to it.) - * 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. - */ - toJSON(): Word.Interfaces.ComboBoxContentControlData; - } - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class Field extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly result: Word.Range; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Field): void; - /** - * Deletes the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNext(): Word.Field; - /** - * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNextOrNullObject(): Word.Field; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Updates the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - updateResult(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Field; - /** - * 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. - */ - track(): Word.Field; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Field; - /** - * 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's passed to it.) - * Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FieldData; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class FieldCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Field[]; - /** - * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Field; - /** - * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Field; - /** - * Gets the Field object collection including the specified types of fields. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param types - Required. An array of field types. - */ - getByTypes(types: Word.FieldType[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; - /** - * 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. - */ - track(): Word.FieldCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.FieldCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.FieldCollectionData; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Font extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Font): void; - - - - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FontLoadOptions): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Font; - /** - * 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. - */ - track(): Word.Font; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Font; - /** - * 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's passed to it.) - * Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FontData; - } - - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePicture extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly paragraph: Word.Paragraph; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly imageFormat: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.InlinePicture): void; - /** - * Deletes the inline picture from the document. - * - * @remarks - * [Api set: WordApi 1.2] - */ - delete(): void; - /** - * Gets the Base64-encoded string representation of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getBase64ImageSrc(): OfficeExtension.ClientResult; - /** - * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.InlinePicture; - /** - * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.InlinePicture; - /** - * Gets the picture, or the starting or ending point of the picture, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Wraps the inline picture with a rich text content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts an inline picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.InlinePicture; - /** - * 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. - */ - track(): Word.InlinePicture; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePicture; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.InlinePictureData; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePictureCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.InlinePicture[]; - /** - * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.InlinePicture; - /** - * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; - /** - * 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. - */ - track(): Word.InlinePictureCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePictureCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.InlinePictureCollectionData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class List extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly id: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelExistences: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelTypes: Word.ListLevelType[]; - /** - * Gets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelFont(level: number): Word.Font; - /** - * Gets the paragraphs that occur at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelParagraphs(level: number): Word.ParagraphCollection; - /** - * Gets the Base64-encoded string representation of the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelPicture(level: number): OfficeExtension.ClientResult; - /** - * Gets the bullet, number, or picture at the specified level as a string. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelString(level: number): OfficeExtension.ClientResult; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Resets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param resetFontName - Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. - */ - resetLevelFont(level: number, resetFontName?: boolean): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: Word.Alignment): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; - /** - * Sets the two indents of the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param textIndent - Required. The text indent in points. It is the same as paragraph left indent. - * @param bulletNumberPictureIndent - Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. - */ - setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; - /** - * Sets the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param base64EncodedImage - Optional. The Base64-encoded image to be set. If not given, the default picture is set. - */ - setLevelPicture(level: number, base64EncodedImage?: string): void; - /** - * Sets the starting number at the specified level in the list. Default value is 1. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param startingNumber - Required. The number to start with. - */ - setLevelStartingNumber(level: number, startingNumber: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLoadOptions): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.List; - /** - * 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. - */ - track(): Word.List; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.List; - /** - * 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's passed to it.) - * Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListData; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.List[]; - /** - * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getById(id: number): Word.List; - /** - * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getByIdOrNullObject(id: number): Word.List; - /** - * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.List; - /** - * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.List; - /** - * Gets a list object by its ID. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - The list's ID. - */ - getItem(id: number): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; - /** - * 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. - */ - track(): Word.ListCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListCollectionData; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listString: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly siblingIndex: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListItem): void; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestor(parentOnly?: boolean): Word.Paragraph; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; - /** - * Gets all descendant list items of the list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param directChildrenOnly - Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. - */ - getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListItem; - /** - * 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. - */ - track(): Word.ListItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListItem; - /** - * 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's passed to it.) - * Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListItemData; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevel extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly font: Word.Font; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListLevel): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListLevel; - /** - * 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. - */ - track(): Word.ListLevel; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevel; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevel` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListLevelData; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevelCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ListLevel[]; - /** - * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.ListLevel; - /** - * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; - /** - * 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. - */ - track(): Word.ListLevelCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevelCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListLevelCollectionData; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListTemplate extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listLevels: Word.ListLevelCollection; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListTemplate): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListTemplate; - /** - * 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. - */ - track(): Word.ListTemplate; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListTemplate; - /** - * 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's passed to it.) - * Whereas the original `Word.ListTemplate` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListTemplateData; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly body: Word.Body; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly reference: Word.Range; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.NoteItemType | "Footnote" | "Endnote"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.NoteItem): void; - /** - * Deletes the note item. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNext(): Word.NoteItem; - /** - * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNextOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.NoteItem; - /** - * 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. - */ - track(): Word.NoteItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItem; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.NoteItemData; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItemCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.NoteItem[]; - /** - * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirst(): Word.NoteItem; - /** - * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirstOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; - /** - * 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. - */ - track(): Word.NoteItemCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItemCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.NoteItemCollectionData; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Page extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly height: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly index: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly width: number; - /** - * Gets the next page in the pane. Throws an `ItemNotFound` error if this page is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Page; - /** - * Gets the next page. If this page is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Page; - /** - * Gets the whole page, or the starting or ending point of the page, as a range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageLoadOptions): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Page; - /** - * 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. - */ - track(): Word.Page; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Page; - /** - * 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's passed to it.) - * Whereas the original `Word.Page` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PageData; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PageCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Page[]; - /** - * Gets the first page in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Page; - /** - * Gets the first page in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PageCollection; - /** - * 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. - */ - track(): Word.PageCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PageCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PageCollectionData; - } - /** - * Represents a window pane. The `Pane` object is a member of the pane collection. The pane collection includes all the window panes for a single window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Pane extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pagesEnclosingViewport: Word.PageCollection; - /** - * Gets the next pane in the window. Throws an `ItemNotFound` error if this pane is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Pane; - /** - * Gets the next pane. If this pane is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Pane; - /** - * 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. - */ - track(): Word.Pane; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Pane; - /** - * 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's passed to it.) - * Whereas the original `Word.Pane` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PaneData; - } - /** - * Represents the collection of pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PaneCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Pane[]; - /** - * Gets the first pane in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Pane; - /** - * Gets the first pane in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PaneCollection; - /** - * 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. - */ - track(): Word.PaneCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PaneCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PaneCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PaneCollectionData; - } - /** - * Represents the window that displays the document. A window can be split to contain multiple reading panes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Window extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active pane in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activePane: Word.Pane; - /** - * Gets the collection of panes in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly panes: Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Window; - /** - * 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. - */ - track(): Word.Window; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Window; - /** - * 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's passed to it.) - * Whereas the original `Word.Window` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.WindowData; - } - /** - * Represents the collection of window objects. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class WindowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Window[]; - /** - * Gets the first window in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Window; - /** - * Gets the first window in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.WindowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.WindowCollection; - /** - * 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. - */ - track(): Word.WindowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.WindowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.WindowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.WindowCollectionData; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Paragraph extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the collection of content control objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly list: Word.List; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItem: Word.ListItem; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItemOrNullObject: Word.ListItem; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listOrNullObject: Word.List; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isLastParagraph: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isListItem: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tableNestingLevel: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly uniqueLocalId: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Paragraph): void; - /** - * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param listId - Required. The ID of an existing list. - * @param level - Required. The level in the list. - */ - attachToList(listId: number, level: number): Word.List; - /** - * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the paragraph and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - /** - * Moves this paragraph out of its list, if the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - detachFromList(): void; - /** - * Gets annotations set on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - */ - getAnnotations(): Word.AnnotationCollection; - /** - * Gets comments associated with the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Paragraph; - /** - * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Paragraph; - /** - * Gets the Office Open XML (OOXML) representation of the paragraph object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPrevious(): Word.Paragraph; - /** - * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPreviousOrNullObject(): Word.Paragraph; - /** - * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). - By default, hidden text and text marked as deleted are excluded. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param options - Optional. Options that define whether the final result should include hidden text and text marked as deleted. - */ - getText(options?: Word.GetTextOptions | { - IncludeHiddenText?: boolean; - IncludeTextMarkedAsDeleted?: boolean; - }): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts annotations on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - * - * @param annotations - Annotations to set. - * @returns An array of the inserted annotations identifiers. - */ - insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the document. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Wraps the Paragraph object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Optional. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the paragraph into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Starts a new list with this paragraph. Fails if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - startNewList(): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Paragraph; - /** - * 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. - */ - track(): Word.Paragraph; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Paragraph; - /** - * 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's passed to it.) - * Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ParagraphCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Paragraph[]; - /** - * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Paragraph; - /** - * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLast(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLastOrNullObject(): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; - /** - * 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. - */ - track(): Word.ParagraphCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ParagraphCollectionData; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class ParagraphFormat extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ParagraphFormat): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ParagraphFormat; - /** - * 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. - */ - track(): Word.ParagraphFormat; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphFormat; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphFormatData; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Range extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of content control objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly inlinePictures: Word.InlinePictureCollection; - - /** - * Gets the collection of list objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the collection of paragraph objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - - /** - * Gets the collection of table objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isEmpty: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Range): void; - /** - * Clears the contents of the range object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Compares this range's location with another range's location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. The range to compare with this range. - */ - compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; - /** - * Deletes the range and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges don't have a union. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandTo(range: Word.Range): Word.Range; - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandToOrNullObject(range: Word.Range): Word.Range; - /** - * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param includeHidden - Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. - * @param includeAdjacent - Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. - */ - getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; - /** - * Gets comments associated with the range. - * - * @remarks - * [Api set: WordApi 1.4] - * @returns - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets hyperlink child ranges within the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getHyperlinkRanges(): Word.RangeCollection; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the OOXML representation of the range object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Clones the range, or gets the starting or ending point of the range as a new range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the range. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Highlights the range temporarily without changing document content. - To highlight the text permanently, set the range's Font.HighlightColor. - * - * @remarks - * [Api set: WordApi 1.8] - */ - highlight(): void; - /** - * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - insertBookmark(name: string): void; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of the canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Insert a comment on the range. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param commentText - Required. The comment text to be inserted. - * @returns comment object - */ - insertComment(commentText: string): Word.Comment; - /** - * Wraps the Range object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts an endnote. The endnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the endnote body. The default is "". - */ - insertEndnote(insertText?: string): Word.NoteItem; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a footnote. The footnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the footnote body. The default is "". - */ - insertFootnote(insertText?: string): Word.NoteItem; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Required. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWith(range: Word.Range): Word.Range; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWithOrNullObject(range: Word.Range): Word.Range; - /** - * Removes the highlight added by the Highlight function if any. - * - * @remarks - * [Api set: WordApi 1.8] - */ - removeHighlight(): void; - /** - * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the range into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Range; - /** - * 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. - */ - track(): Word.Range; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Range; - /** - * 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's passed to it.) - * Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.RangeData; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class RangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Range[]; - /** - * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Range; - /** - * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; - /** - * 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. - */ - track(): Word.RangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.RangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.RangeCollectionData; - } - /** - * Specifies the options to determine location and size when inserting a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface InsertShapeOptions { - /** - * Represents the height of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Represents the left position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * Represents the top position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * Represents the width of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** - * Specifies the options to determine what to copy when inserting a file. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface InsertFileOptions { - /** - * Represents whether the change tracking mode status from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importChangeTrackingMode?: boolean; - /** - * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomProperties?: boolean; - /** - * Represents whether the custom XML parts from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomXmlParts?: boolean; - /** - * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - importDifferentOddEvenPages?: boolean; - /** - * Represents whether the page color and other background information from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importPageColor?: boolean; - /** - * Represents whether the paragraph spacing from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importParagraphSpacing?: boolean; - /** - * Represents whether the styles from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importStyles?: boolean; - /** - * Represents whether the theme from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importTheme?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SearchOptions extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.SearchOptions): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.SearchOptions; - /** - * Create a new instance of the `Word.SearchOptions` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - /** - * 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's passed to it.) - * Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SearchOptionsData; - } - /** - * Specifies the options to be included in a getText operation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface GetTextOptions { - /** - * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeHiddenText?: boolean; - /** - * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeTextMarkedAsDeleted?: boolean; - } - /** - * Specifies the options to be included in a compare document operation. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface DocumentCompareOptions { - /** - * True adds the document to the list of recently used files on the File menu. The default value is True. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - addToRecentFiles?: boolean; - /** - * The reviewer name associated with the differences generated by the comparison. - If unspecified, the value defaults to the author name of the revised document or the string "Comparison" if no author information is present. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - authorName?: string; - /** - * The target document for the comparison. Default value is 'CompareTargetCurrent'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTarget?: Word.CompareTarget | "CompareTargetCurrent" | "CompareTargetSelected" | "CompareTargetNew"; - /** - * True (default) for the comparison to include detection of format changes. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - detectFormatChanges?: boolean; - /** - * True compares the documents without notifying a user of problems. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignoreAllComparisonWarnings?: boolean; - /** - * True removes date and time stamp information from tracked changes in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removeDateAndTime?: boolean; - /** - * True removes all user information from comments, revisions, and the properties dialog box in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removePersonalInformation?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Section extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Section): void; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Section; - /** - * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Section; - /** - * 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. - */ - track(): Word.Section; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Section; - /** - * 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's passed to it.) - * Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SectionData; - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SectionCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Section[]; - /** - * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Section; - /** - * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; - /** - * 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. - */ - track(): Word.SectionCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SectionCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SectionCollectionData; - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Setting extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly key: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Setting): void; - /** - * Deletes the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Setting; - /** - * 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. - */ - track(): Word.Setting; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Setting; - /** - * 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's passed to it.) - * Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SettingData; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class SettingCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Setting[]; - /** - * Creates a new setting or sets an existing setting. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The setting's key, which is case-sensitive. - * @param value - Required. The setting's value. - */ - add(key: string, value: any): Word.Setting; - /** - * Deletes all settings in this add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - deleteAll(): void; - /** - * Gets the count of settings. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - The key that identifies the setting object. - */ - getItem(key: string): Word.Setting; - /** - * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The key that identifies the setting object. - */ - getItemOrNullObject(key: string): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; - /** - * 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. - */ - track(): Word.SettingCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SettingCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SettingCollectionData; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class StyleCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Style[]; - /** - * Get the style object by its name. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByName(name: string): Word.Style; - /** - * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByNameOrNullObject(name: string): Word.Style; - /** - * Gets the number of the styles in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a style object by its index in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param index - A number that identifies the index location of a style object. - */ - getItem(index: number): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; - /** - * 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. - */ - track(): Word.StyleCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.StyleCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.StyleCollectionData; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Style extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly borders: Word.BorderCollection; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly font: Word.Font; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listTemplate: Word.ListTemplate; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly paragraphFormat: Word.ParagraphFormat; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly shading: Word.Shading; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly tableStyle: Word.TableStyle; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly builtIn: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly inUse: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly linked: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly nameLocal: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Style): void; - /** - * Deletes the style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Style; - /** - * 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. - */ - track(): Word.Style; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Style; - /** - * 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's passed to it.) - * Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.StyleData; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class Shading extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shading): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shading; - /** - * 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. - */ - track(): Word.Shading; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shading; - /** - * 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's passed to it.) - * Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShadingData; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Table extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of endnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rows: Word.TableRowCollection; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isUniform: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly nestingLevel: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowCount: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Table): void; - /** - * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; - /** - * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Autofits the table columns to the width of the window. - * - * @remarks - * [Api set: WordApi 1.3] - */ - autoFitWindow(): void; - /** - * Clears the contents of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Deletes specific columns. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param columnIndex - Required. The first column to delete. - * @param columnCount - Optional. The number of columns to delete. Default 1. - */ - deleteColumns(columnIndex: number, columnCount?: number): void; - /** - * Deletes specific rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The first row to delete. - * @param rowCount - Optional. The number of rows to delete. Default 1. - */ - deleteRows(rowIndex: number, rowCount?: number): void; - /** - * Distributes the column widths evenly. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - distributeColumns(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCell(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Table; - /** - * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Table; - /** - * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfter(): Word.Paragraph; - /** - * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfterOrNullObject(): Word.Paragraph; - /** - * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBefore(): Word.Paragraph; - /** - * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBeforeOrNullObject(): Word.Paragraph; - /** - * Gets the range that contains this table, or the range at the start or end of the table. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; - /** - * Inserts a content control on the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Merges the cells bounded inclusively by a first and last cell. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param topRow - Required. The row of the first cell - * @param firstCell - Required. The index of the first cell in its row - * @param bottomRow - Required. The row of the last cell - * @param lastCell - Required. The index of the last cell in its row - */ - mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableLoadOptions): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Table; - /** - * 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. - */ - track(): Word.Table; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Table; - /** - * 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's passed to it.) - * Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableData; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TableStyle extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableStyle): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableStyle; - /** - * 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. - */ - track(): Word.TableStyle; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableStyle; - /** - * 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's passed to it.) - * Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableStyleData; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Table[]; - /** - * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Table; - /** - * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; - /** - * 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. - */ - track(): Word.TableCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCollectionData; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRow extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cells: Word.TableCellCollection; - /** - * Gets the collection of endnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellCount: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isHeader: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableRow): void; - /** - * Clears the contents of the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableRow; - /** - * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableRow; - /** - * Inserts a content control on the row. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add - * @param values - Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Merges the row into one cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - merge(): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableRow; - /** - * 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. - */ - track(): Word.TableRow; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRow; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableRowData; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableRow[]; - /** - * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableRow; - /** - * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; - /** - * 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. - */ - track(): Word.TableRowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableRowCollectionData; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCell extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly body: Word.Body; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentRow: Word.TableRow; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellIndex: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableCell): void; - /** - * Deletes the column containing this cell. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteColumn(): void; - /** - * Deletes the row containing this cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteRow(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableCell; - /** - * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableCell; - /** - * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; - /** - * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Splits the cell into the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param rowCount - Required. The number of rows to split into. Must be a divisor of the number of underlying rows. - * @param columnCount - Required. The number of columns to split into. - */ - split(rowCount: number, columnCount: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableCell; - /** - * 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. - */ - track(): Word.TableCell; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCell; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableCellData; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCellCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableCell[]; - /** - * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableCell; - /** - * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; - /** - * 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. - */ - track(): Word.TableCellCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCellCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCellCollectionData; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableBorder extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableBorder): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableBorder; - /** - * 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. - */ - track(): Word.TableBorder; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableBorder; - /** - * 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's passed to it.) - * Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableBorderData; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly author: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly date: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly text: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - /** - * Accepts the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - accept(): void; - /** - * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNext(): Word.TrackedChange; - /** - * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNextOrNullObject(): Word.TrackedChange; - /** - * Gets the range of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Rejects the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TrackedChange; - /** - * 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. - */ - track(): Word.TrackedChange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChange; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TrackedChangeData; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TrackedChange[]; - /** - * Accepts all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - acceptAll(): void; - /** - * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirst(): Word.TrackedChange; - /** - * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirstOrNullObject(): Word.TrackedChange; - /** - * Rejects all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rejectAll(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; - /** - * 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. - */ - track(): Word.TrackedChangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TrackedChangeCollectionData; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Shape extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly body: Word.Body; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly canvas: Word.Canvas; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly fill: Word.ShapeFill; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentCanvas: Word.Shape; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentGroup: Word.Shape; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapeGroup: Word.ShapeGroup; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textFrame: Word.TextFrame; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textWrap: Word.ShapeTextWrap; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly isChild: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shape): void; - /** - * Deletes the shape and its content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - delete(): void; - /** - * Moves the shape horizontally by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved horizontally, in points. Use a positive value to move the shape right. Use a negative value to move the shape left. - */ - moveHorizontally(distance: number): void; - /** - * Moves the shape vertically by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved vertically, in points. Use a positive value to move the shape up. Use a negative value to move the shape down. - */ - moveVertically(distance: number): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Selects the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param selectMultipleShapes - Optional. Whether to select multiple floating shapes. The default value is false. - */ - select(selectMultipleShapes?: boolean): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeLoadOptions): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shape; - /** - * 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. - */ - track(): Word.Shape; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shape; - /** - * 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's passed to it.) - * Whereas the original `Word.Shape` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeData; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeGroup extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeGroupUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeGroup): void; - /** - * Ungroups any grouped shapes in the specified shape group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ungroup(): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeGroupLoadOptions): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeGroup; - /** - * 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. - */ - track(): Word.ShapeGroup; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeGroup; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeGroup` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeGroupData; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Canvas extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CanvasUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Canvas): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CanvasLoadOptions): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Canvas; - /** - * 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. - */ - track(): Word.Canvas; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Canvas; - /** - * 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's passed to it.) - * Whereas the original `Word.Canvas` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CanvasData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CanvasData; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Shape[]; - /** - * Gets the shapes that have the specified geometric types. Only applied to geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of geometric shape subtypes. - */ - getByGeometricTypes(types: Word.GeometricShapeType[]): Word.ShapeCollection; - /** - * Gets a shape by its identifier. Throws an `ItemNotFound` error if there isn't a shape with the identifier in this collection. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getById(id: number): Word.Shape; - /** - * Gets a shape by its identifier. If there isn't a shape with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getByIdOrNullObject(id: number): Word.Shape; - /** - * Gets the shapes by the identifiers. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param ids - Required. An array of shape identifiers. - */ - getByIds(ids: number[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified names. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param names - Required. An array of shape names. - */ - getByNames(names: string[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified types. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of shape types. - */ - getByTypes(types: Word.ShapeType[]): Word.ShapeCollection; - /** - * Gets the first shape in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Shape; - /** - * Gets the first shape in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Shape; - /** - * Groups floating shapes in this collection, inline shapes will be skipped. Returns a Shape object that represents the new group of shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group(): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ShapeCollection; - /** - * 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. - */ - track(): Word.ShapeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ShapeCollectionData; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeFill extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeFill): void; - /** - * Clears the fill formatting of this shape and set it to `Word.ShapeFillType.NoFill`; - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - clear(): void; - /** - * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Word.ShapeFillType.Solid`. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param color - A string that represents the fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - */ - setSolidColor(color: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeFillLoadOptions): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeFill; - /** - * 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. - */ - track(): Word.ShapeFill; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeFill; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeFillData; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class TextFrame extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly hasText: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TextFrameUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TextFrame): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TextFrameLoadOptions): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TextFrame; - /** - * 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. - */ - track(): Word.TextFrame; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TextFrame; - /** - * 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's passed to it.) - * Whereas the original `Word.TextFrame` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TextFrameData; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeTextWrap extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeTextWrapUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeTextWrap): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeTextWrapLoadOptions): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeTextWrap; - /** - * 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. - */ - track(): Word.ShapeTextWrap; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeTextWrap; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeTextWrap` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeTextWrapData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeTextWrapData; - } - - - - - - - - - - - - - - - /** - * Represents the possible change tracking modes. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingMode { - /** - * ChangeTracking is turned off. - * @remarks - * [Api set: WordApi 1.4] - */ - off = "Off", - /** - * ChangeTracking is turned on for everyone. - * @remarks - * [Api set: WordApi 1.4] - */ - trackAll = "TrackAll", - /** - * Tracking is turned on for my changes only. - * @remarks - * [Api set: WordApi 1.4] - */ - trackMineOnly = "TrackMineOnly", - } - /** - * Specify the current version or the original version of the text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingVersion { - /** - * @remarks - * [Api set: WordApi 1.4] - */ - original = "Original", - /** - * @remarks - * [Api set: WordApi 1.4] - */ - current = "Current", - } - /** - * Specify the track state when ChangeTracking is on. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum ChangeTrackingState { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - added = "Added", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - deleted = "Deleted", - } - /** - * TrackedChange type. - * - * @remarks - * [Api set: WordApi 1.6] - */ - enum TrackedChangeType { - /** - * No revision. - * @remarks - * [Api set: WordApi 1.6] - */ - none = "None", - /** - * Add change. - * @remarks - * [Api set: WordApi 1.6] - */ - added = "Added", - /** - * Delete change. - * @remarks - * [Api set: WordApi 1.6] - */ - deleted = "Deleted", - /** - * Format change. - * @remarks - * [Api set: WordApi 1.6] - */ - formatted = "Formatted", - } - /** - * Note item type - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum NoteItemType { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - } - /** - * Provides information about the type of a raised event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventType { - /** - * ContentControlDeleted represents the event that the content control has been deleted. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDeleted = "ContentControlDeleted", - /** - * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlSelectionChanged = "ContentControlSelectionChanged", - /** - * ContentControlDataChanged represents the event that the data in the content control have been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDataChanged = "ContentControlDataChanged", - /** - * ContentControlAdded represents the event a content control has been added to the document. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlAdded = "ContentControlAdded", - /** - * Represents that a content control has been entered. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlEntered = "ContentControlEntered", - /** - * Represents that a content control has been exited. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlExited = "ContentControlExited", - /** - * Represents that one or more new paragraphs were added. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphAdded = "ParagraphAdded", - /** - * Represents that one or more paragraphs were changed. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphChanged = "ParagraphChanged", - /** - * Represents that one or more paragraphs were deleted. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphDeleted = "ParagraphDeleted", - /** - * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationClicked = "AnnotationClicked", - /** - * Represents that an annotation was hovered over in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationHovered = "AnnotationHovered", - /** - * Represents that one or more annotations were added in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationInserted = "AnnotationInserted", - /** - * Represents that one or more annotations were deleted from the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationRemoved = "AnnotationRemoved", - /** - * Represents an action in the annotation pop-up. - * @remarks - * [Api set: WordApi 1.8] - */ - annotationPopupAction = "AnnotationPopupAction", - } - /** - * An enum that specifies an event's source. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventSource { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - local = "Local", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - remote = "Remote", - } - /** - * Provides information about the content control that raised contentControlAdded event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlAddedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDataChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDataChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDeleted event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDeletedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlEntered event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlEnteredEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlExited event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlExitedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlSelectionChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlSelectionChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the paragraphs that raised the paragraphAdded event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphAddedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphChanged event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphChangedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphDeleted event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphDeletedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Specifies supported content control types and subtypes. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum ContentControlType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextInline = "RichTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextParagraphs = "RichTextParagraphs", - /** - * Contains a whole cell. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableCell = "RichTextTableCell", - /** - * Contains a whole row. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableRow = "RichTextTableRow", - /** - * Contains a whole table. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTable = "RichTextTable", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextInline = "PlainTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextParagraph = "PlainTextParagraph", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - picture = "Picture", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - buildingBlockGallery = "BuildingBlockGallery", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - checkBox = "CheckBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - comboBox = "ComboBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dropDownList = "DropDownList", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - datePicker = "DatePicker", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - repeatingSection = "RepeatingSection", - /** - * Identifies a rich text content control. - * @remarks - * [Api set: WordApi 1.1] - */ - richText = "RichText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainText = "PlainText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - group = "Group", - } - /** - * ContentControl appearance. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Content control appearance options are BoundingBox, Tags, or Hidden. - */ - enum ContentControlAppearance { - /** - * Represents a content control shown as a shaded rectangle or bounding box (with optional title). - * @remarks - * [Api set: WordApi 1.1] - */ - boundingBox = "BoundingBox", - /** - * Represents a content control shown as start and end markers. - * @remarks - * [Api set: WordApi 1.1] - */ - tags = "Tags", - /** - * Represents a content control that isn't shown. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - } - - /** - * The supported styles for underline format. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum UnderlineType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * No underline. - * @remarks - * [Api set: WordApi 1.1] - */ - none = "None", - /** - * Warning: hidden has been deprecated. - * @deprecated Hidden is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - /** - * Warning: dotLine has been deprecated. - * @deprecated DotLine is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - dotLine = "DotLine", - /** - * A single underline. This is the default value. - * @remarks - * [Api set: WordApi 1.1] - */ - single = "Single", - /** - * Only underline individual words. - * @remarks - * [Api set: WordApi 1.1] - */ - word = "Word", - /** - * A double underline. - * @remarks - * [Api set: WordApi 1.1] - */ - double = "Double", - /** - * A single thick underline. - * @remarks - * [Api set: WordApi 1.1] - */ - thick = "Thick", - /** - * A dotted underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dottedHeavy = "DottedHeavy", - /** - * A single dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dashLine = "DashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineHeavy = "DashLineHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLong = "DashLineLong", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLongHeavy = "DashLineLongHeavy", - /** - * An alternating dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLine = "DotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLineHeavy = "DotDashLineHeavy", - /** - * An alternating dot-dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLine = "TwoDotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLineHeavy = "TwoDotDashLineHeavy", - /** - * A single wavy underline. - * @remarks - * [Api set: WordApi 1.1] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveHeavy = "WaveHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveDouble = "WaveDouble", - } - /** - * Specifies the form of a break. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum BreakType { - /** - * Page break at the insertion point. - * @remarks - * [Api set: WordApi 1.1] - */ - page = "Page", - /** - * Warning: next has been deprecated. Use sectionNext instead. - * @deprecated Use sectionNext instead. - * @remarks - * [Api set: WordApi 1.1] - */ - next = "Next", - /** - * Section break on next page. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionNext = "SectionNext", - /** - * New section without a corresponding page break. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionContinuous = "SectionContinuous", - /** - * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionEven = "SectionEven", - /** - * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionOdd = "SectionOdd", - /** - * Line break. - * @remarks - * [Api set: WordApi 1.1] - */ - line = "Line", - } - /** - * The insertion location types. - * - * @remarks - * [Api set: WordApi 1.1] - * - * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. - * If the location is "Before" or "After", the new content will be outside of the modified object. - * If the location is "Start" or "End", the new content will be included as part of the modified object. - */ - enum InsertLocation { - /** - * Add content before the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - before = "Before", - /** - * Add content after the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - after = "After", - /** - * Prepend content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * Append content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - /** - * Replace the contents of the current object. - * @remarks - * [Api set: WordApi 1.1] - */ - replace = "Replace", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum Alignment { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * Unknown alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * Alignment to the left. - * @remarks - * [Api set: WordApi 1.1] - */ - left = "Left", - /** - * Alignment to the center. - * @remarks - * [Api set: WordApi 1.1] - */ - centered = "Centered", - /** - * Alignment to the right. - * @remarks - * [Api set: WordApi 1.1] - */ - right = "Right", - /** - * Fully justified alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - justified = "Justified", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum HeaderFooterType { - /** - * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. - * @remarks - * [Api set: WordApi 1.1] - */ - primary = "Primary", - /** - * Returns the header or footer on the first page of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - firstPage = "FirstPage", - /** - * Returns all headers or footers on even-numbered pages of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - evenPages = "EvenPages", - } - /** - * Represents the types of body objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum BodyType { - /** - * Unknown body type. - * @remarks - * [Api set: WordApi 1.3] - */ - unknown = "Unknown", - /** - * Main document body. - * @remarks - * [Api set: WordApi 1.3] - */ - mainDoc = "MainDoc", - /** - * Section body. - * @remarks - * [Api set: WordApi 1.3] - */ - section = "Section", - /** - * Header body. - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * Footer body. - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * Table cell body. - * @remarks - * [Api set: WordApi 1.3] - */ - tableCell = "TableCell", - /** - * Footnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * Endnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - /** - * Note body e.g., endnote, footnote. - * @remarks - * [Api set: WordApi 1.5] - */ - noteItem = "NoteItem", - } - /** - * This enum sets where the cursor (insertion point) in the document is after a selection. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SelectionMode { - /** - * The entire range is selected. - * @remarks - * [Api set: WordApi 1.1] - */ - select = "Select", - /** - * The cursor is at the beginning of the selection (just before the start of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * The cursor is at the end of the selection (just after the end of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImageFormat { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - unsupported = "Unsupported", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - undefined = "Undefined", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bmp = "Bmp", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - jpeg = "Jpeg", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gif = "Gif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tiff = "Tiff", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - png = "Png", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - icon = "Icon", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - exif = "Exif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - wmf = "Wmf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - emf = "Emf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pict = "Pict", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pdf = "Pdf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - svg = "Svg", - } - /** - * Represents the location of a range. You can get range by calling getRange on different objects such as {@link Word.Paragraph} and {@link Word.ContentControl}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum RangeLocation { - /** - * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. - * @remarks - * [Api set: WordApi 1.3] - */ - whole = "Whole", - /** - * The starting point of the object. For content control, it's the point after the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - start = "Start", - /** - * The ending point of the object. For paragraph, it's the point before the EOP (end of paragraph). For content control, it's the point before the closing tag. - * @remarks - * [Api set: WordApi 1.3] - */ - end = "End", - /** - * For content control only. It's the point before the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * The point after the object. If the object is a paragraph content control or table content control, it's the point after the EOP or Table characters. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - /** - * The range between 'Start' and 'End'. - * @remarks - * [Api set: WordApi 1.3] - */ - content = "Content", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum LocationRelation { - /** - * Indicates that this instance and the range are in different sub-documents. - * @remarks - * [Api set: WordApi 1.3] - */ - unrelated = "Unrelated", - /** - * Indicates that this instance and the range represent the same range. - * @remarks - * [Api set: WordApi 1.3] - */ - equal = "Equal", - /** - * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsStart = "ContainsStart", - /** - * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsEnd = "ContainsEnd", - /** - * Indicates that this instance contains the range, with the exception of the start and end character of this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - contains = "Contains", - /** - * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideStart = "InsideStart", - /** - * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideEnd = "InsideEnd", - /** - * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * Indicates that this instance occurs before, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentBefore = "AdjacentBefore", - /** - * Indicates that this instance starts before the range and overlaps the range's first character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsBefore = "OverlapsBefore", - /** - * Indicates that this instance occurs before the range. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * Indicates that this instance occurs after, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentAfter = "AdjacentAfter", - /** - * Indicates that this instance starts inside the range and overlaps the range’s last character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsAfter = "OverlapsAfter", - /** - * Indicates that this instance occurs after the range. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideHorizontal = "InsideHorizontal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideVertical = "InsideVertical", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - outside = "Outside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - all = "All", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum CellPaddingLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - } - /** - * Represents the width of a style's border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum BorderWidth { - /** - * None width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * 0.25 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt025 = "Pt025", - /** - * 0.50 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt050 = "Pt050", - /** - * 0.75 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt075 = "Pt075", - /** - * 1.00 point. This is the default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt100 = "Pt100", - /** - * 1.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt150 = "Pt150", - /** - * 2.25 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt225 = "Pt225", - /** - * 3.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt300 = "Pt300", - /** - * 4.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt450 = "Pt450", - /** - * 6.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt600 = "Pt600", - /** - * Mixed width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - mixed = "Mixed", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - single = "Single", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - double = "Double", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashed = "Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotDashed = "DotDashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dot2Dashed = "Dot2Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - triple = "Triple", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickSmall = "ThinThickSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinSmall = "ThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinSmall = "ThinThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickMed = "ThinThickMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinMed = "ThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinMed = "ThinThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickLarge = "ThinThickLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinLarge = "ThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinLarge = "ThinThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - doubleWave = "DoubleWave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashedSmall = "DashedSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashDotStroked = "DashDotStroked", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEmboss = "ThreeDEmboss", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEngrave = "ThreeDEngrave", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum VerticalAlignment { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - center = "Center", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListLevelType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - picture = "Picture", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListBullet { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - custom = "Custom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - solid = "Solid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hollow = "Hollow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - square = "Square", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - diamonds = "Diamonds", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arrow = "Arrow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - checkmark = "Checkmark", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListNumbering { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerLetter = "LowerLetter", - } - /** - * Represents the built-in style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - * - * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. - */ - enum BuiltInStyleName { - /** - * Mixed styles or other style not in this list. - * @remarks - * [Api set: WordApi 1.3] - */ - other = "Other", - /** - * Reset character and paragraph style to default. - * @remarks - * [Api set: WordApi 1.3] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading1 = "Heading1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading2 = "Heading2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading3 = "Heading3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading4 = "Heading4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading5 = "Heading5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading6 = "Heading6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading7 = "Heading7", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading8 = "Heading8", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading9 = "Heading9", - /** - * Table-of-content level 1. - * @remarks - * [Api set: WordApi 1.3] - */ - toc1 = "Toc1", - /** - * Table-of-content level 2. - * @remarks - * [Api set: WordApi 1.3] - */ - toc2 = "Toc2", - /** - * Table-of-content level 3. - * @remarks - * [Api set: WordApi 1.3] - */ - toc3 = "Toc3", - /** - * Table-of-content level 4. - * @remarks - * [Api set: WordApi 1.3] - */ - toc4 = "Toc4", - /** - * Table-of-content level 5. - * @remarks - * [Api set: WordApi 1.3] - */ - toc5 = "Toc5", - /** - * Table-of-content level 6. - * @remarks - * [Api set: WordApi 1.3] - */ - toc6 = "Toc6", - /** - * Table-of-content level 7. - * @remarks - * [Api set: WordApi 1.3] - */ - toc7 = "Toc7", - /** - * Table-of-content level 8. - * @remarks - * [Api set: WordApi 1.3] - */ - toc8 = "Toc8", - /** - * Table-of-content level 9. - * @remarks - * [Api set: WordApi 1.3] - */ - toc9 = "Toc9", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteText = "FootnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - caption = "Caption", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteReference = "FootnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteReference = "EndnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteText = "EndnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - title = "Title", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtitle = "Subtitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink = "Hyperlink", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - strong = "Strong", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - emphasis = "Emphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - noSpacing = "NoSpacing", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listParagraph = "ListParagraph", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - quote = "Quote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseQuote = "IntenseQuote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleEmphasis = "SubtleEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseEmphasis = "IntenseEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleReference = "SubtleReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseReference = "IntenseReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bookTitle = "BookTitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bibliography = "Bibliography", - /** - * Table-of-content heading. - * @remarks - * [Api set: WordApi 1.3] - */ - tocHeading = "TocHeading", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGrid = "TableGrid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable1 = "PlainTable1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable2 = "PlainTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable3 = "PlainTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable4 = "PlainTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable5 = "PlainTable5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGridLight = "TableGridLight", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light = "GridTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent1 = "GridTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent2 = "GridTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent3 = "GridTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent4 = "GridTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent5 = "GridTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent6 = "GridTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2 = "GridTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent1 = "GridTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent2 = "GridTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent3 = "GridTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent4 = "GridTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent5 = "GridTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent6 = "GridTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3 = "GridTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent1 = "GridTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent2 = "GridTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent3 = "GridTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent4 = "GridTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent5 = "GridTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent6 = "GridTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4 = "GridTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent1 = "GridTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent2 = "GridTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent3 = "GridTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent4 = "GridTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent5 = "GridTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent6 = "GridTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark = "GridTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful = "GridTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful = "GridTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light = "ListTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent1 = "ListTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent2 = "ListTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent3 = "ListTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent4 = "ListTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent5 = "ListTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent6 = "ListTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2 = "ListTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent1 = "ListTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent2 = "ListTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent3 = "ListTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent4 = "ListTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent5 = "ListTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent6 = "ListTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3 = "ListTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent1 = "ListTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent2 = "ListTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent3 = "ListTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent4 = "ListTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent5 = "ListTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent6 = "ListTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4 = "ListTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent1 = "ListTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent2 = "ListTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent3 = "ListTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent4 = "ListTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent5 = "ListTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent6 = "ListTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark = "ListTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent1 = "ListTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent2 = "ListTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent3 = "ListTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent4 = "ListTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent5 = "ListTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent6 = "ListTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful = "ListTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful = "ListTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum DocumentPropertyType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - string = "String", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - date = "Date", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - boolean = "Boolean", - } - /** - * Represents the type of style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum StyleType { - /** - * Represents that the style is a character style. - * @remarks - * [Api set: WordApi 1.5] - */ - character = "Character", - /** - * Represents that the style is a list style. Currently supported on desktop. - * @remarks - * [Api set: WordApi 1.5] - */ - list = "List", - /** - * Represents that the style is a paragraph style. - * @remarks - * [Api set: WordApi 1.5] - */ - paragraph = "Paragraph", - /** - * Represents that the style is a table style. - * @remarks - * [Api set: WordApi 1.5] - */ - table = "Table", - } - /** - * Represents the outline levels. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum OutlineLevel { - /** - * Represents outline level 1. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel1 = "OutlineLevel1", - /** - * Represents outline level 2. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel2 = "OutlineLevel2", - /** - * Represents outline level 3. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel3 = "OutlineLevel3", - /** - * Represents outline level 4. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel4 = "OutlineLevel4", - /** - * Represents outline level 5. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel5 = "OutlineLevel5", - /** - * Represents outline level 6. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel6 = "OutlineLevel6", - /** - * Represents outline level 7. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel7 = "OutlineLevel7", - /** - * Represents outline level 8. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel8 = "OutlineLevel8", - /** - * Represents outline level 9. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel9 = "OutlineLevel9", - /** - * Represents outline level body text, not an outline level. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevelBodyText = "OutlineLevelBodyText", - } - /** - * Specifies the close behavior for `Document.close`. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum CloseBehavior { - /** - * Saves the changes before closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - save = "Save", - /** - * Discard the possible changes when closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - skipSave = "SkipSave", - } - /** - * Specifies the save behavior for `Document.save`. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SaveBehavior { - /** - * Saves the document without prompting the user. If it's a new document, - it will be saved with the default name or specified name in the default location. - * @remarks - * [Api set: WordApi 1.1] - */ - save = "Save", - /** - * Displays the "Save As" dialog to the user if the document hasn't been saved. - Won't take effect if the document was previously saved. - * @remarks - * [Api set: WordApi 1.1] - */ - prompt = "Prompt", - } - /** - * Represents the type of Field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldType { - /** - * Represents that the field type is Add-in. - * @remarks - * [Api set: WordApi 1.5] - */ - addin = "Addin", - /** - * Represents that the field type is AddressBlock. - * @remarks - * [Api set: WordApi 1.5] - */ - addressBlock = "AddressBlock", - /** - * Represents that the field type is Advance. - * @remarks - * [Api set: WordApi 1.5] - */ - advance = "Advance", - /** - * Represents that the field type is Ask. - * @remarks - * [Api set: WordApi 1.5] - */ - ask = "Ask", - /** - * Represents that the field type is Author. - * @remarks - * [Api set: WordApi 1.5] - */ - author = "Author", - /** - * Represents that the field type is AutoText. - * @remarks - * [Api set: WordApi 1.5] - */ - autoText = "AutoText", - /** - * Represents that the field type is AutoTextList. - * @remarks - * [Api set: WordApi 1.5] - */ - autoTextList = "AutoTextList", - /** - * Represents that the field type is Barcode. - * @remarks - * [Api set: WordApi 1.5] - */ - barCode = "BarCode", - /** - * Represents that the field type is Bibliography. - * @remarks - * [Api set: WordApi 1.5] - */ - bibliography = "Bibliography", - /** - * Represents that the field type is BidiOutline. - * @remarks - * [Api set: WordApi 1.5] - */ - bidiOutline = "BidiOutline", - /** - * Represents that the field type is Citation. - * @remarks - * [Api set: WordApi 1.5] - */ - citation = "Citation", - /** - * Represents that the field type is Comments. - * @remarks - * [Api set: WordApi 1.5] - */ - comments = "Comments", - /** - * Represents that the field type is Compare. - * @remarks - * [Api set: WordApi 1.5] - */ - compare = "Compare", - /** - * Represents that the field type is CreateDate. - * @remarks - * [Api set: WordApi 1.5] - */ - createDate = "CreateDate", - /** - * Represents that the field type is Data. - * @remarks - * [Api set: WordApi 1.5] - */ - data = "Data", - /** - * Represents that the field type is Database. - * @remarks - * [Api set: WordApi 1.5] - */ - database = "Database", - /** - * Represents that the field type is Date. - * @remarks - * [Api set: WordApi 1.5] - */ - date = "Date", - /** - * Represents that the field type is DisplayBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - displayBarcode = "DisplayBarcode", - /** - * Represents that the field type is DocumentProperty - * @remarks - * [Api set: WordApi 1.5] - */ - docProperty = "DocProperty", - /** - * Represents that the field type is DocumentVariable. - * @remarks - * [Api set: WordApi 1.5] - */ - docVariable = "DocVariable", - /** - * Represents that the field type is EditTime. - * @remarks - * [Api set: WordApi 1.5] - */ - editTime = "EditTime", - /** - * Represents that the field type is Embedded. - * @remarks - * [Api set: WordApi 1.5] - */ - embedded = "Embedded", - /** - * Represents that the field type is Equation. - * @remarks - * [Api set: WordApi 1.5] - */ - eq = "EQ", - /** - * Represents that the field type is Expression. - * @remarks - * [Api set: WordApi 1.5] - */ - expression = "Expression", - /** - * Represents that the field type is FileName. - * @remarks - * [Api set: WordApi 1.5] - */ - fileName = "FileName", - /** - * Represents that the field type is FileSize. - * @remarks - * [Api set: WordApi 1.5] - */ - fileSize = "FileSize", - /** - * Represents that the field type is FillIn. - * @remarks - * [Api set: WordApi 1.5] - */ - fillIn = "FillIn", - /** - * Represents that the field type is FormCheckbox. - * @remarks - * [Api set: WordApi 1.5] - */ - formCheckbox = "FormCheckbox", - /** - * Represents that the field type is FormDropdown. - * @remarks - * [Api set: WordApi 1.5] - */ - formDropdown = "FormDropdown", - /** - * Represents that the field type is FormText. - * @remarks - * [Api set: WordApi 1.5] - */ - formText = "FormText", - /** - * Represents that the field type is GotoButton. - * @remarks - * [Api set: WordApi 1.5] - */ - gotoButton = "GotoButton", - /** - * Represents that the field type is GreetingLine. - * @remarks - * [Api set: WordApi 1.5] - */ - greetingLine = "GreetingLine", - /** - * Represents that the field type is Hyperlink. - * @remarks - * [Api set: WordApi 1.5] - */ - hyperlink = "Hyperlink", - /** - * Represents that the field type is If. - * @remarks - * [Api set: WordApi 1.5] - */ - if = "If", - /** - * Represents that the field type is Import. - * @remarks - * [Api set: WordApi 1.5] - */ - import = "Import", - /** - * Represents that the field type is Include. - * @remarks - * [Api set: WordApi 1.5] - */ - include = "Include", - /** - * Represents that the field type is IncludePicture. - * @remarks - * [Api set: WordApi 1.5] - */ - includePicture = "IncludePicture", - /** - * Represents that the field type is IncludeText. - * @remarks - * [Api set: WordApi 1.5] - */ - includeText = "IncludeText", - /** - * Represents that the field type is Index. - * @remarks - * [Api set: WordApi 1.5] - */ - index = "Index", - /** - * Represents that the field type is Information. - * @remarks - * [Api set: WordApi 1.5] - */ - info = "Info", - /** - * Represents that the field type is Keywords. - * @remarks - * [Api set: WordApi 1.5] - */ - keywords = "Keywords", - /** - * Represents that the field type is LastSavedBy. - * @remarks - * [Api set: WordApi 1.5] - */ - lastSavedBy = "LastSavedBy", - /** - * Represents that the field type is Link. - * @remarks - * [Api set: WordApi 1.5] - */ - link = "Link", - /** - * Represents that the field type is ListNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - listNum = "ListNum", - /** - * Represents that the field type is MacroButton. - * @remarks - * [Api set: WordApi 1.5] - */ - macroButton = "MacroButton", - /** - * Represents that the field type is MergeBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeBarcode = "MergeBarcode", - /** - * Represents that the field type is MergeField. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeField = "MergeField", - /** - * Represents that the field type is MergeRecord. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeRec = "MergeRec", - /** - * Represents that the field type is MergeSequence. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeSeq = "MergeSeq", - /** - * Represents that the field type is Next. - * @remarks - * [Api set: WordApi 1.5] - */ - next = "Next", - /** - * Represents that the field type is NextIf. - * @remarks - * [Api set: WordApi 1.5] - */ - nextIf = "NextIf", - /** - * Represents that the field type is NoteReference. - * @remarks - * [Api set: WordApi 1.5] - */ - noteRef = "NoteRef", - /** - * Represents that the field type is NumberOfCharacters. - * @remarks - * [Api set: WordApi 1.5] - */ - numChars = "NumChars", - /** - * Represents that the field type is NumberOfPages. - * @remarks - * [Api set: WordApi 1.5] - */ - numPages = "NumPages", - /** - * Represents that the field type is NumberOfWords. - * @remarks - * [Api set: WordApi 1.5] - */ - numWords = "NumWords", - /** - * Represents that the field type is ActiveXControl. - * @remarks - * [Api set: WordApi 1.5] - */ - ocx = "OCX", - /** - * Represents that the field type is Page. - * @remarks - * [Api set: WordApi 1.5] - */ - page = "Page", - /** - * Represents that the field type is PageReference. - * @remarks - * [Api set: WordApi 1.5] - */ - pageRef = "PageRef", - /** - * Represents that the field type is Print. - * @remarks - * [Api set: WordApi 1.5] - */ - print = "Print", - /** - * Represents that the field type is PrintDate. - * @remarks - * [Api set: WordApi 1.5] - */ - printDate = "PrintDate", - /** - * Represents that the field type is Private. - * @remarks - * [Api set: WordApi 1.5] - */ - private = "Private", - /** - * Represents that the field type is Quote. - * @remarks - * [Api set: WordApi 1.5] - */ - quote = "Quote", - /** - * Represents that the field type is ReferencedDocument. - * @remarks - * [Api set: WordApi 1.5] - */ - rd = "RD", - /** - * Represents that the field type is Reference. - * @remarks - * [Api set: WordApi 1.5] - */ - ref = "Ref", - /** - * Represents that the field type is RevisionNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - revNum = "RevNum", - /** - * Represents that the field type is SaveDate. - * @remarks - * [Api set: WordApi 1.5] - */ - saveDate = "SaveDate", - /** - * Represents that the field type is Section. - * @remarks - * [Api set: WordApi 1.5] - */ - section = "Section", - /** - * Represents that the field type is SectionPages. - * @remarks - * [Api set: WordApi 1.5] - */ - sectionPages = "SectionPages", - /** - * Represents that the field type is Sequence. - * @remarks - * [Api set: WordApi 1.5] - */ - seq = "Seq", - /** - * Represents that the field type is Set. - * @remarks - * [Api set: WordApi 1.5] - */ - set = "Set", - /** - * Represents that the field type is Shape. - * @remarks - * [Api set: WordApi 1.5] - */ - shape = "Shape", - /** - * Represents that the field type is SkipIf. - * @remarks - * [Api set: WordApi 1.5] - */ - skipIf = "SkipIf", - /** - * Represents that the field type is StyleReference. - * @remarks - * [Api set: WordApi 1.5] - */ - styleRef = "StyleRef", - /** - * Represents that the field type is Subject. - * @remarks - * [Api set: WordApi 1.5] - */ - subject = "Subject", - /** - * Represents that the field type is Subscriber. - * @remarks - * [Api set: WordApi 1.5] - */ - subscriber = "Subscriber", - /** - * Represents that the field type is Symbol. - * @remarks - * [Api set: WordApi 1.5] - */ - symbol = "Symbol", - /** - * Represents that the field type is TableOfAuthoritiesEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - ta = "TA", - /** - * Represents that the field type is TableOfContentsEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - tc = "TC", - /** - * Represents that the field type is Template. - * @remarks - * [Api set: WordApi 1.5] - */ - template = "Template", - /** - * Represents that the field type is Time. - * @remarks - * [Api set: WordApi 1.5] - */ - time = "Time", - /** - * Represents that the field type is Title. - * @remarks - * [Api set: WordApi 1.5] - */ - title = "Title", - /** - * Represents that the field type is TableOfAuthorities. - * @remarks - * [Api set: WordApi 1.5] - */ - toa = "TOA", - /** - * Represents that the field type is TableOfContents. - * @remarks - * [Api set: WordApi 1.5] - */ - toc = "TOC", - /** - * Represents that the field type is UserAddress. - * @remarks - * [Api set: WordApi 1.5] - */ - userAddress = "UserAddress", - /** - * Represents that the field type is UserInitials. - * @remarks - * [Api set: WordApi 1.5] - */ - userInitials = "UserInitials", - /** - * Represents that the field type is UserName. - * @remarks - * [Api set: WordApi 1.5] - */ - userName = "UserName", - /** - * Represents that the field type is IndexEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - xe = "XE", - /** - * Represents that the field type is Empty. - * @remarks - * [Api set: WordApi 1.5] - */ - empty = "Empty", - /** - * Represents the field types not supported by the Office JavaScript API. - * @remarks - * [Api set: WordApi 1.5] - */ - others = "Others", - /** - * Represents that the field type is Undefined. - * @remarks - * [Api set: WordApi 1.5] - */ - undefined = "Undefined", - } - /** - * Represents the kind of field. Indicates how the field works in relation to updating. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldKind { - /** - * Represents that the field is invalid. For example, a pair of field characters with nothing inside. - * @remarks - * [Api set: WordApi 1.5] - */ - none = "None", - /** - * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - hot = "Hot", - /** - * Represents that the field is automatically updated when the source changes or the field can be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - warm = "Warm", - /** - * Represents that the field doesn't have a result. - * @remarks - * [Api set: WordApi 1.5] - */ - cold = "Cold", - } - /** - * Represents the character inserted after the list item mark. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum TrailingCharacter { - /** - * A tab is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingTab = "TrailingTab", - /** - * A space is inserted. Default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingSpace = "TrailingSpace", - /** - * No character is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingNone = "TrailingNone", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ListBuiltInNumberStyle { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerLetter = "LowerLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinal = "Ordinal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - cardinalText = "CardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinalText = "OrdinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanji = "Kanji", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiDigit = "KanjiDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueoHalfWidth = "AiueoHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - irohaHalfWidth = "IrohaHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicFullWidth = "ArabicFullWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional = "KanjiTraditional", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional2 = "KanjiTraditional2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberInCircle = "NumberInCircle", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueo = "Aiueo", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - iroha = "Iroha", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ = "ArabicLZ", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ganada = "Ganada", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - chosung = "Chosung", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum1 = "GBNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum2 = "GBNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum3 = "GBNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum4 = "GBNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac1 = "Zodiac1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac2 = "Zodiac2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac3 = "Zodiac3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum1 = "TradChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum2 = "TradChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum3 = "TradChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum4 = "TradChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum1 = "SimpChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum2 = "SimpChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum3 = "SimpChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum4 = "SimpChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaRead = "HanjaRead", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaReadDigit = "HanjaReadDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hangul = "Hangul", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanja = "Hanja", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew1 = "Hebrew1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic1 = "Arabic1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew2 = "Hebrew2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic2 = "Arabic2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter1 = "HindiLetter1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter2 = "HindiLetter2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiArabic = "HindiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiCardinalText = "HindiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiLetter = "ThaiLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiArabic = "ThaiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiCardinalText = "ThaiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - vietCardinalText = "VietCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseRussian = "LowercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseRussian = "UppercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseGreek = "LowercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseGreek = "UppercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ2 = "ArabicLZ2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ3 = "ArabicLZ3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ4 = "ArabicLZ4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseTurkish = "LowercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseTurkish = "UppercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseBulgarian = "LowercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseBulgarian = "UppercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pictureBullet = "PictureBullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legal = "Legal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legalLZ = "LegalLZ", - } - /** - * Represents the shading texture. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ShadingTextureType { - /** - * Represents dark diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalDown = "DarkDiagonalDown", - /** - * Represents dark diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalUp = "DarkDiagonalUp", - /** - * Represents dark horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkGrid = "DarkGrid", - /** - * Represents dark horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkHorizontal = "DarkHorizontal", - /** - * Represents dark diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkTrellis = "DarkTrellis", - /** - * Represents dark vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkVertical = "DarkVertical", - /** - * Represents light diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalDown = "LightDiagonalDown", - /** - * Represents light diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalUp = "LightDiagonalUp", - /** - * Represents light horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightGrid = "LightGrid", - /** - * Represents light horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightHorizontal = "LightHorizontal", - /** - * Represents light diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightTrellis = "LightTrellis", - /** - * Represents light vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightVertical = "LightVertical", - /** - * Represents that there's no texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * Represents 10 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent10 = "Percent10", - /** - * Represents 12.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent12Pt5 = "Percent12Pt5", - /** - * Represents 15 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent15 = "Percent15", - /** - * Represents 20 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent20 = "Percent20", - /** - * Represents 25 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent25 = "Percent25", - /** - * Represents 30 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent30 = "Percent30", - /** - * Represents 35 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent35 = "Percent35", - /** - * Represents 37.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent37Pt5 = "Percent37Pt5", - /** - * Represents 40 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent40 = "Percent40", - /** - * Represents 45 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent45 = "Percent45", - /** - * Represents 5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent5 = "Percent5", - /** - * Represents 50 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent50 = "Percent50", - /** - * Represents 55 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent55 = "Percent55", - /** - * Represents 60 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent60 = "Percent60", - /** - * Represents 62.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent62Pt5 = "Percent62Pt5", - /** - * Represents 65 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent65 = "Percent65", - /** - * Represents 70 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent70 = "Percent70", - /** - * Represents 75 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent75 = "Percent75", - /** - * Represents 80 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent80 = "Percent80", - /** - * Represents 85 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent85 = "Percent85", - /** - * Represents 87.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent87Pt5 = "Percent87Pt5", - /** - * Represents 90 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent90 = "Percent90", - /** - * Represents 95 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent95 = "Percent95", - /** - * Represents solid texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - solid = "Solid", - } - /** - * Specifies the target document for displaying document comparison differences. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum CompareTarget { - /** - * Places comparison differences in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetCurrent = "CompareTargetCurrent", - /** - * Places comparison differences in the target document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetSelected = "CompareTargetSelected", - /** - * Places comparison differences in a new document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetNew = "CompareTargetNew", - } - /** - * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImportedStylesConflictBehavior { - /** - * Ignore conflicting imported styles and keep the existing version of those styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignore = "Ignore", - /** - * Overwrite the existing styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - overwrite = "Overwrite", - /** - * 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. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - createNew = "CreateNew", - } - /** - * Represents the shape type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeType { - /** - * Unsupported shape type. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - unsupported = "Unsupported", - /** - * Text box shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textBox = "TextBox", - /** - * Geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShape = "GeometricShape", - /** - * Group shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group = "Group", - /** - * Picture shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Canvas shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas = "Canvas", - } - /** - * Represents what the horizontal position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeHorizontalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to column. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - column = "Column", - /** - * Relative to character. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - character = "Character", - /** - * Relative to left margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin = "LeftMargin", - /** - * Relative to right margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin = "RightMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the vertical position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeVerticalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to paragraph. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - paragraph = "Paragraph", - /** - * Relative to line. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - line = "Line", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the horizontal or vertical size of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeSize { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Specifies the shape type for a `GeometricShape` object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum GeometricShapeType { - /** - * Line inverse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lineInverse = "LineInverse", - /** - * Triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - triangle = "Triangle", - /** - * Right triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightTriangle = "RightTriangle", - /** - * Rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rectangle = "Rectangle", - /** - * Diamond geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diamond = "Diamond", - /** - * Parallelogram geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parallelogram = "Parallelogram", - /** - * Trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - trapezoid = "Trapezoid", - /** - * Non-isosceles trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", - /** - * Pentagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pentagon = "Pentagon", - /** - * Hexagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hexagon = "Hexagon", - /** - * Heptagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heptagon = "Heptagon", - /** - * Octagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - octagon = "Octagon", - /** - * Decagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - decagon = "Decagon", - /** - * Dodecagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - dodecagon = "Dodecagon", - /** - * Star 4-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star4 = "Star4", - /** - * Star 5-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star5 = "Star5", - /** - * Star 6-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star6 = "Star6", - /** - * Star 7-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star7 = "Star7", - /** - * Star 8-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star8 = "Star8", - /** - * Star 10-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star10 = "Star10", - /** - * Star 12-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star12 = "Star12", - /** - * Star 16-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star16 = "Star16", - /** - * Star 24-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star24 = "Star24", - /** - * Star 32-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star32 = "Star32", - /** - * Round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - roundRectangle = "RoundRectangle", - /** - * Round one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round1Rectangle = "Round1Rectangle", - /** - * Round two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2SameRectangle = "Round2SameRectangle", - /** - * Round two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2DiagonalRectangle = "Round2DiagonalRectangle", - /** - * Snip round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snipRoundRectangle = "SnipRoundRectangle", - /** - * Snip one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip1Rectangle = "Snip1Rectangle", - /** - * Snip two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2SameRectangle = "Snip2SameRectangle", - /** - * Snip two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2DiagonalRectangle = "Snip2DiagonalRectangle", - /** - * Plaque geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaque = "Plaque", - /** - * Ellipse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipse = "Ellipse", - /** - * Teardrop geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - teardrop = "Teardrop", - /** - * Home plate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - homePlate = "HomePlate", - /** - * Chevron geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chevron = "Chevron", - /** - * Pie wedge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pieWedge = "PieWedge", - /** - * Pie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pie = "Pie", - /** - * Block arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - blockArc = "BlockArc", - /** - * Donut geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - donut = "Donut", - /** - * No smoking geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noSmoking = "NoSmoking", - /** - * Right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrow = "RightArrow", - /** - * Left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrow = "LeftArrow", - /** - * Up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrow = "UpArrow", - /** - * Down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrow = "DownArrow", - /** - * Striped right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - stripedRightArrow = "StripedRightArrow", - /** - * Notched right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - notchedRightArrow = "NotchedRightArrow", - /** - * Bent up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentUpArrow = "BentUpArrow", - /** - * Left-right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrow = "LeftRightArrow", - /** - * Up-down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrow = "UpDownArrow", - /** - * Left-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftUpArrow = "LeftUpArrow", - /** - * Left-right-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightUpArrow = "LeftRightUpArrow", - /** - * Quad arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrow = "QuadArrow", - /** - * Left arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrowCallout = "LeftArrowCallout", - /** - * Right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrowCallout = "RightArrowCallout", - /** - * Up arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrowCallout = "UpArrowCallout", - /** - * Down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrowCallout = "DownArrowCallout", - /** - * Left-right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrowCallout = "LeftRightArrowCallout", - /** - * Up-down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrowCallout = "UpDownArrowCallout", - /** - * Quad arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrowCallout = "QuadArrowCallout", - /** - * Bent arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentArrow = "BentArrow", - /** - * U-turn arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - uturnArrow = "UturnArrow", - /** - * Circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - circularArrow = "CircularArrow", - /** - * Left circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftCircularArrow = "LeftCircularArrow", - /** - * Left-right circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightCircularArrow = "LeftRightCircularArrow", - /** - * Curved right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedRightArrow = "CurvedRightArrow", - /** - * Curved left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedLeftArrow = "CurvedLeftArrow", - /** - * Curved up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedUpArrow = "CurvedUpArrow", - /** - * Curved down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedDownArrow = "CurvedDownArrow", - /** - * Swoosh arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - swooshArrow = "SwooshArrow", - /** - * Cube geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cube = "Cube", - /** - * Can geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - can = "Can", - /** - * Lightning bolt geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lightningBolt = "LightningBolt", - /** - * Heart geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heart = "Heart", - /** - * Sun geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - sun = "Sun", - /** - * Moon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - moon = "Moon", - /** - * Smiley face geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - smileyFace = "SmileyFace", - /** - * Irregular seal 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal1 = "IrregularSeal1", - /** - * Irregular seal 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal2 = "IrregularSeal2", - /** - * Folded corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foldedCorner = "FoldedCorner", - /** - * Bevel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bevel = "Bevel", - /** - * Frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - frame = "Frame", - /** - * Half frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - halfFrame = "HalfFrame", - /** - * Corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - corner = "Corner", - /** - * Diagonal stripe geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diagonalStripe = "DiagonalStripe", - /** - * Chord geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chord = "Chord", - /** - * Arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - arc = "Arc", - /** - * Left bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBracket = "LeftBracket", - /** - * Right bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBracket = "RightBracket", - /** - * Left brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBrace = "LeftBrace", - /** - * Right brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBrace = "RightBrace", - /** - * Bracket pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracketPair = "BracketPair", - /** - * Brace pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracePair = "BracePair", - /** - * Callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout1 = "Callout1", - /** - * Callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout2 = "Callout2", - /** - * Callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout3 = "Callout3", - /** - * Accent callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout1 = "AccentCallout1", - /** - * Accent callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout2 = "AccentCallout2", - /** - * Accent callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout3 = "AccentCallout3", - /** - * Border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout1 = "BorderCallout1", - /** - * Border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout2 = "BorderCallout2", - /** - * Border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout3 = "BorderCallout3", - /** - * Accent border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout1 = "AccentBorderCallout1", - /** - * Accent border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout2 = "AccentBorderCallout2", - /** - * Accent border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout3 = "AccentBorderCallout3", - /** - * Wedge rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRectCallout = "WedgeRectCallout", - /** - * Wedge rounded rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRRectCallout = "WedgeRRectCallout", - /** - * Wedge ellipse callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeEllipseCallout = "WedgeEllipseCallout", - /** - * Cloud callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloudCallout = "CloudCallout", - /** - * Cloud geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloud = "Cloud", - /** - * Ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon = "Ribbon", - /** - * Ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon2 = "Ribbon2", - /** - * Ellipse ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon = "EllipseRibbon", - /** - * Ellipse ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon2 = "EllipseRibbon2", - /** - * Left-right ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightRibbon = "LeftRightRibbon", - /** - * Vertical scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalScroll = "VerticalScroll", - /** - * Horizontal scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontalScroll = "HorizontalScroll", - /** - * Wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wave = "Wave", - /** - * Double wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - doubleWave = "DoubleWave", - /** - * Plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plus = "Plus", - /** - * Flow chart process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartProcess = "FlowChartProcess", - /** - * Flow chart decision geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDecision = "FlowChartDecision", - /** - * Flow chart input-output geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInputOutput = "FlowChartInputOutput", - /** - * Flow chart predefined process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPredefinedProcess = "FlowChartPredefinedProcess", - /** - * Flow chart internal storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInternalStorage = "FlowChartInternalStorage", - /** - * Flow chart document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDocument = "FlowChartDocument", - /** - * Flow chart multidocument geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMultidocument = "FlowChartMultidocument", - /** - * Flow chart terminator geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartTerminator = "FlowChartTerminator", - /** - * Flow chart preparation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPreparation = "FlowChartPreparation", - /** - * Flow chart manual input geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualInput = "FlowChartManualInput", - /** - * Flow chart manual operation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualOperation = "FlowChartManualOperation", - /** - * Flow chart connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartConnector = "FlowChartConnector", - /** - * Flow chart punched card geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedCard = "FlowChartPunchedCard", - /** - * Flow chart punched tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedTape = "FlowChartPunchedTape", - /** - * Flow chart summing junction geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSummingJunction = "FlowChartSummingJunction", - /** - * Flow chart OR geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOr = "FlowChartOr", - /** - * Flow chart collate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartCollate = "FlowChartCollate", - /** - * Flow chart sort geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSort = "FlowChartSort", - /** - * Flow chart extract geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartExtract = "FlowChartExtract", - /** - * Flow chart merge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMerge = "FlowChartMerge", - /** - * Flow chart offline storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOfflineStorage = "FlowChartOfflineStorage", - /** - * Flow chart online storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOnlineStorage = "FlowChartOnlineStorage", - /** - * Flow chart magnetic tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticTape = "FlowChartMagneticTape", - /** - * Flow chart magnetic disk geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDisk = "FlowChartMagneticDisk", - /** - * Flow chart magnetic drum geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDrum = "FlowChartMagneticDrum", - /** - * Flow chart display geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDisplay = "FlowChartDisplay", - /** - * Flow chart delay geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDelay = "FlowChartDelay", - /** - * Flow chart alternate process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartAlternateProcess = "FlowChartAlternateProcess", - /** - * Flow chart off-page connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOffpageConnector = "FlowChartOffpageConnector", - /** - * Action button blank geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBlank = "ActionButtonBlank", - /** - * Action button home geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHome = "ActionButtonHome", - /** - * Action button help geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHelp = "ActionButtonHelp", - /** - * Action button information geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonInformation = "ActionButtonInformation", - /** - * Action button forward next geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonForwardNext = "ActionButtonForwardNext", - /** - * Action button back previous geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBackPrevious = "ActionButtonBackPrevious", - /** - * Action button end geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonEnd = "ActionButtonEnd", - /** - * Action button beginning geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBeginning = "ActionButtonBeginning", - /** - * Action button return geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonReturn = "ActionButtonReturn", - /** - * Action button document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonDocument = "ActionButtonDocument", - /** - * Action button sound geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonSound = "ActionButtonSound", - /** - * Action button movie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonMovie = "ActionButtonMovie", - /** - * Gear 6 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear6 = "Gear6", - /** - * Gear 9 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear9 = "Gear9", - /** - * Funnel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - funnel = "Funnel", - /** - * Math plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathPlus = "MathPlus", - /** - * Math minus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMinus = "MathMinus", - /** - * Math multiply geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMultiply = "MathMultiply", - /** - * Math divide geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathDivide = "MathDivide", - /** - * Math equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathEqual = "MathEqual", - /** - * Math not equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathNotEqual = "MathNotEqual", - /** - * Corner tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cornerTabs = "CornerTabs", - /** - * Square tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - squareTabs = "SquareTabs", - /** - * Plaque tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaqueTabs = "PlaqueTabs", - /** - * Chart X geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartX = "ChartX", - /** - * Chart star geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartStar = "ChartStar", - /** - * Chart plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartPlus = "ChartPlus", - } - /** - * Specifies a shape's fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeFillType { - /** - * No fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noFill = "NoFill", - /** - * Solid fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - solid = "Solid", - /** - * Gradient fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gradient = "Gradient", - /** - * Pattern fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pattern = "Pattern", - /** - * Picture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Texture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - texture = "Texture", - /** - * Mixed fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies the vertical alignment for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextVerticalAlignment { - /** - * Anchor the text at the top of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top = "Top", - /** - * Anchor the text at the middle of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - middle = "Middle", - /** - * Anchor the text at the bottom of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottom = "Bottom", - } - /** - * Specifies the orientation for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextOrientation { - /** - * No orientation, such as in a new geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Horizontal text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontal = "Horizontal", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianVertical = "EastAsianVertical", - /** - * Determines if all of the text is vertical orientation (each line is 270 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical270 = "Vertical270", - /** - * Determines if all of the text is vertical orientation (each line is 90 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical = "Vertical", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianHorizontalRotated = "EastAsianHorizontalRotated", - /** - * A combination of automatic orientation is used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Determines the type of automatic sizing allowed. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeAutoSize { - /** - * No autosizing. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * The text is adjusted to fit the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textToFitShape = "TextToFitShape", - /** - * The shape is adjusted to fit the text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeToFitText = "ShapeToFitText", - /** - * A combination of automatic sizing schemes are used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies how to wrap document text around a shape. For more details, see the "Text Wrapping" tab of {@link https://support.microsoft.com/office/a0f53857-b501-46c6-ba8b-68ba51e0e3cc | Layout options}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapType { - /** - * Places the shape in line with text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - inline = "Inline", - /** - * Wraps text squarely around the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - square = "Square", - /** - * Wraps text close to the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - tight = "Tight", - /** - * Wraps text around and through the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - through = "Through", - /** - * Places text above and below the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topBottom = "TopBottom", - /** - * Places shape behind text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - behind = "Behind", - /** - * Places shape in front of text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - front = "Front", - } - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farther from the respective page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapSide { - /** - * Has no wrap side property, such as those for inline shapes. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Both left and right sides of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - both = "Both", - /** - * Left side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left = "Left", - /** - * Right side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - right = "Right", - /** - * Side of the shape that's farther from the respective page margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - largest = "Largest", - } - /** - * Specifies the scale size type of a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleType { - /** - * Scale from current size of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - currentSize = "CurrentSize", - /** - * Scale from original size of the shape. It only works for pictures. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - originalSize = "OriginalSize", - } - /** - * Specifies which part of the shape retains its position when the shape is scaled. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleFrom { - /** - * Scale from the top left corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromTopLeft = "ScaleFromTopLeft", - /** - * Scale from the center of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromMiddle = "ScaleFromMiddle", - /** - * Scale from the bottom right corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromBottomRight = "ScaleFromBottomRight", - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum ErrorCodes { - accessDenied = "AccessDenied", - generalException = "GeneralException", - invalidArgument = "InvalidArgument", - itemNotFound = "ItemNotFound", - notAllowed = "NotAllowed", - notImplemented = "NotImplemented", - searchDialogIsOpen = "SearchDialogIsOpen", - searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", - } - export namespace Interfaces { - /** - * Provides ways to load properties of only a subset of members of a collection. - */ - export interface CollectionLoadOptions { - /** - * Specify the number of items in the queried collection to be included in the result. - */ - $top?: number; - /** - * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. - */ - $skip?: number; - } - /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ - export interface AnnotationCollectionUpdateData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface for updating data on the `Application` object, for use in `application.set({ ... })`. */ - export interface ApplicationUpdateData { - - - } - /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ - export interface BodyUpdateData { - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ - export interface BorderUpdateData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface for updating data on the `BorderUniversal` object, for use in `borderUniversal.set({ ... })`. */ - export interface BorderUniversalUpdateData { - - - - - - - - } - /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ - export interface BorderCollectionUpdateData { - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor?: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor?: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - items?: Word.Interfaces.BorderData[]; - } - /** An interface for updating data on the `BorderUniversalCollection` object, for use in `borderUniversalCollection.set({ ... })`. */ - export interface BorderUniversalCollectionUpdateData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface for updating data on the `Break` object, for use in `break.set({ ... })`. */ - export interface BreakUpdateData { - - } - /** An interface for updating data on the `BreakCollection` object, for use in `breakCollection.set({ ... })`. */ - export interface BreakCollectionUpdateData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface for updating data on the `BuildingBlock` object, for use in `buildingBlock.set({ ... })`. */ - export interface BuildingBlockUpdateData { - - - - - } - /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ - export interface CheckboxContentControlUpdateData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ - export interface CommentUpdateData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ - export interface CommentCollectionUpdateData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ - export interface CommentContentRangeUpdateData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`. */ - export interface CommentReplyUpdateData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentUpdateData; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - } - /** An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... })`. */ - export interface CommentReplyCollectionUpdateData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface for updating data on the `XmlMapping` object, for use in `xmlMapping.set({ ... })`. */ - export interface XmlMappingUpdateData { - - - } - /** An interface for updating data on the `CustomXmlPrefixMappingCollection` object, for use in `customXmlPrefixMappingCollection.set({ ... })`. */ - export interface CustomXmlPrefixMappingCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface for updating data on the `CustomXmlSchemaCollection` object, for use in `customXmlSchemaCollection.set({ ... })`. */ - export interface CustomXmlSchemaCollectionUpdateData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface for updating data on the `CustomXmlNodeCollection` object, for use in `customXmlNodeCollection.set({ ... })`. */ - export interface CustomXmlNodeCollectionUpdateData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface for updating data on the `CustomXmlNode` object, for use in `customXmlNode.set({ ... })`. */ - export interface CustomXmlNodeUpdateData { - - - - - - - - - } - /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ - export interface ContentControlUpdateData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - } - /** An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ ... })`. */ - export interface ContentControlCollectionUpdateData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ - export interface ContentControlListItemUpdateData { - /** - * Specifies the display text of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - displayText?: string; - /** - * Specifies the index location of a content control list item in the collection of list items. - * - * @remarks - * [Api set: WordApi 1.9] - */ - index?: number; - /** - * Specifies the programmatic value of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - value?: string; - } - /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ - export interface ContentControlListItemCollectionUpdateData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ - export interface CustomPropertyUpdateData { - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ ... })`. */ - export interface CustomPropertyCollectionUpdateData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface for updating data on the `CustomXmlPart` object, for use in `customXmlPart.set({ ... })`. */ - export interface CustomXmlPartUpdateData { - - } - /** An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... })`. */ - export interface CustomXmlPartCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in `customXmlPartScopedCollection.set({ ... })`. */ - export interface CustomXmlPartScopedCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `Document` object, for use in `document.set({ ... })`. */ - export interface DocumentUpdateData { - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - } - /** An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`. */ - export interface DocumentCreatedUpdateData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - } - /** An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. */ - export interface DocumentPropertiesUpdateData { - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface for updating data on the `Field` object, for use in `field.set({ ... })`. */ - export interface FieldUpdateData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeUpdateData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - } - /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ - export interface FieldCollectionUpdateData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface for updating data on the `Font` object, for use in `font.set({ ... })`. */ - export interface FontUpdateData { - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface for updating data on the `Hyperlink` object, for use in `hyperlink.set({ ... })`. */ - export interface HyperlinkUpdateData { - - - - - - - - } - /** An interface for updating data on the `HyperlinkCollection` object, for use in `hyperlinkCollection.set({ ... })`. */ - export interface HyperlinkCollectionUpdateData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`. */ - export interface InlinePictureUpdateData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... })`. */ - export interface InlinePictureCollectionUpdateData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`. */ - export interface ListCollectionUpdateData { - items?: Word.Interfaces.ListData[]; - } - /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ - export interface ListItemUpdateData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - } - /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ - export interface ListLevelUpdateData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ - export interface ListLevelCollectionUpdateData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ - export interface ListTemplateUpdateData { - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ - export interface NoteItemUpdateData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeUpdateData; - } - /** An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. */ - export interface NoteItemCollectionUpdateData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface for updating data on the `PageCollection` object, for use in `pageCollection.set({ ... })`. */ - export interface PageCollectionUpdateData { - items?: Word.Interfaces.PageData[]; - } - /** An interface for updating data on the `PaneCollection` object, for use in `paneCollection.set({ ... })`. */ - export interface PaneCollectionUpdateData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface for updating data on the `WindowCollection` object, for use in `windowCollection.set({ ... })`. */ - export interface WindowCollectionUpdateData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`. */ - export interface ParagraphUpdateData { - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemUpdateData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. */ - export interface ParagraphCollectionUpdateData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`. */ - export interface ParagraphFormatUpdateData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface for updating data on the `Range` object, for use in `range.set({ ... })`. */ - export interface RangeUpdateData { - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`. */ - export interface RangeCollectionUpdateData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`. */ - export interface SearchOptionsUpdateData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface for updating data on the `Section` object, for use in `section.set({ ... })`. */ - export interface SectionUpdateData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - - } - /** An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`. */ - export interface SectionCollectionUpdateData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`. */ - export interface SettingUpdateData { - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`. */ - export interface SettingCollectionUpdateData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`. */ - export interface StyleCollectionUpdateData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ - export interface StyleUpdateData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionUpdateData; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontUpdateData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateUpdateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingUpdateData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleUpdateData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - - - - - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`. */ - export interface ShadingUpdateData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface for updating data on the `ShadingUniversal` object, for use in `shadingUniversal.set({ ... })`. */ - export interface ShadingUniversalUpdateData { - - - - - - } - /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ - export interface TableUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ - export interface TableStyleUpdateData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`. */ - export interface TableCollectionUpdateData { - items?: Word.Interfaces.TableData[]; - } - /** An interface for updating data on the `TableColumn` object, for use in `tableColumn.set({ ... })`. */ - export interface TableColumnUpdateData { - - - - - } - /** An interface for updating data on the `TableColumnCollection` object, for use in `tableColumnCollection.set({ ... })`. */ - export interface TableColumnCollectionUpdateData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`. */ - export interface TableRowUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. */ - export interface TableRowCollectionUpdateData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`. */ - export interface TableCellUpdateData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. */ - export interface TableCellCollectionUpdateData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`. */ - export interface TableBorderUpdateData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `Template` object, for use in `template.set({ ... })`. */ - export interface TemplateUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `TemplateCollection` object, for use in `templateCollection.set({ ... })`. */ - export interface TemplateCollectionUpdateData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... })`. */ - export interface TrackedChangeCollectionUpdateData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface for updating data on the `Shape` object, for use in `shape.set({ ... })`. */ - export interface ShapeUpdateData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasUpdateData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillUpdateData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupUpdateData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameUpdateData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapUpdateData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface for updating data on the `ShapeGroup` object, for use in `shapeGroup.set({ ... })`. */ - export interface ShapeGroupUpdateData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `Canvas` object, for use in `canvas.set({ ... })`. */ - export interface CanvasUpdateData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `ShapeCollection` object, for use in `shapeCollection.set({ ... })`. */ - export interface ShapeCollectionUpdateData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface for updating data on the `ShapeFill` object, for use in `shapeFill.set({ ... })`. */ - export interface ShapeFillUpdateData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - } - /** An interface for updating data on the `TextFrame` object, for use in `textFrame.set({ ... })`. */ - export interface TextFrameUpdateData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface for updating data on the `ShapeTextWrap` object, for use in `shapeTextWrap.set({ ... })`. */ - export interface ShapeTextWrapUpdateData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface for updating data on the `RepeatingSectionItem` object, for use in `repeatingSectionItem.set({ ... })`. */ - export interface RepeatingSectionItemUpdateData { - - } - /** An interface for updating data on the `DatePickerContentControl` object, for use in `datePickerContentControl.set({ ... })`. */ - export interface DatePickerContentControlUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `PictureContentControl` object, for use in `pictureContentControl.set({ ... })`. */ - export interface PictureContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `GroupContentControl` object, for use in `groupContentControl.set({ ... })`. */ - export interface GroupContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `BuildingBlockGalleryContentControl` object, for use in `buildingBlockGalleryContentControl.set({ ... })`. */ - export interface BuildingBlockGalleryContentControlUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `RepeatingSectionContentControl` object, for use in `repeatingSectionContentControl.set({ ... })`. */ - export interface RepeatingSectionContentControlUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `Frame` object, for use in `frame.set({ ... })`. */ - export interface FrameUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `FrameCollection` object, for use in `frameCollection.set({ ... })`. */ - export interface FrameCollectionUpdateData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface for updating data on the `DocumentLibraryVersionCollection` object, for use in `documentLibraryVersionCollection.set({ ... })`. */ - export interface DocumentLibraryVersionCollectionUpdateData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface for updating data on the `ListFormat` object, for use in `listFormat.set({ ... })`. */ - export interface ListFormatUpdateData { - - - } - /** An interface for updating data on the `FillFormat` object, for use in `fillFormat.set({ ... })`. */ - export interface FillFormatUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `GlowFormat` object, for use in `glowFormat.set({ ... })`. */ - export interface GlowFormatUpdateData { - - - - } - /** An interface for updating data on the `LineFormat` object, for use in `lineFormat.set({ ... })`. */ - export interface LineFormatUpdateData { - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `ReflectionFormat` object, for use in `reflectionFormat.set({ ... })`. */ - export interface ReflectionFormatUpdateData { - - - - - - } - /** An interface for updating data on the `ColorFormat` object, for use in `colorFormat.set({ ... })`. */ - export interface ColorFormatUpdateData { - - - - - } - /** An interface for updating data on the `ShadowFormat` object, for use in `shadowFormat.set({ ... })`. */ - export interface ShadowFormatUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `ThreeDimensionalFormat` object, for use in `threeDimensionalFormat.set({ ... })`. */ - export interface ThreeDimensionalFormatUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `Bibliography` object, for use in `bibliography.set({ ... })`. */ - export interface BibliographyUpdateData { - - } - /** An interface for updating data on the `SourceCollection` object, for use in `sourceCollection.set({ ... })`. */ - export interface SourceCollectionUpdateData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface for updating data on the `PageSetup` object, for use in `pageSetup.set({ ... })`. */ - export interface PageSetupUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `LineNumbering` object, for use in `lineNumbering.set({ ... })`. */ - export interface LineNumberingUpdateData { - - - - - - } - /** An interface for updating data on the `TextColumnCollection` object, for use in `textColumnCollection.set({ ... })`. */ - export interface TextColumnCollectionUpdateData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface for updating data on the `TextColumn` object, for use in `textColumn.set({ ... })`. */ - export interface TextColumnUpdateData { - - - } - /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ - export interface CritiqueAnnotationData { - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: Word.Critique; - } - /** An interface describing the data returned by calling `annotation.toJSON()`. */ - export interface AnnotationData { - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - } - /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ - export interface AnnotationCollectionData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface describing the data returned by calling `application.toJSON()`. */ - export interface ApplicationData { - - - - } - /** An interface describing the data returned by calling `body.toJSON()`. */ - export interface BodyData { - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - } - /** An interface describing the data returned by calling `border.toJSON()`. */ - export interface BorderData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface describing the data returned by calling `borderUniversal.toJSON()`. */ - export interface BorderUniversalData { - - - - - - - - - } - /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ - export interface BorderCollectionData { - items?: Word.Interfaces.BorderData[]; - } - /** An interface describing the data returned by calling `borderUniversalCollection.toJSON()`. */ - export interface BorderUniversalCollectionData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface describing the data returned by calling `break.toJSON()`. */ - export interface BreakData { - - - } - /** An interface describing the data returned by calling `breakCollection.toJSON()`. */ - export interface BreakCollectionData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface describing the data returned by calling `buildingBlock.toJSON()`. */ - export interface BuildingBlockData { - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockCategory.toJSON()`. */ - export interface BuildingBlockCategoryData { - - - } - /** An interface describing the data returned by calling `buildingBlockTypeItem.toJSON()`. */ - export interface BuildingBlockTypeItemData { - - - } - /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ - export interface CheckboxContentControlData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface describing the data returned by calling `comment.toJSON()`. */ - export interface CommentData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - replies?: Word.Interfaces.CommentReplyData[]; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ - export interface CommentCollectionData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ - export interface CommentContentRangeData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface describing the data returned by calling `commentReply.toJSON()`. */ - export interface CommentReplyData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentData; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - } - /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ - export interface CommentReplyCollectionData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface describing the data returned by calling `xmlMapping.toJSON()`. */ - export interface XmlMappingData { - - - - - - } - /** An interface describing the data returned by calling `customXmlPrefixMappingCollection.toJSON()`. */ - export interface CustomXmlPrefixMappingCollectionData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface describing the data returned by calling `customXmlPrefixMapping.toJSON()`. */ - export interface CustomXmlPrefixMappingData { - - - } - /** An interface describing the data returned by calling `customXmlSchema.toJSON()`. */ - export interface CustomXmlSchemaData { - - - } - /** An interface describing the data returned by calling `customXmlSchemaCollection.toJSON()`. */ - export interface CustomXmlSchemaCollectionData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface describing the data returned by calling `customXmlNodeCollection.toJSON()`. */ - export interface CustomXmlNodeCollectionData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface describing the data returned by calling `customXmlNode.toJSON()`. */ - export interface CustomXmlNodeData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `contentControl.toJSON()`. */ - export interface ContentControlData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; - /** - * Gets the data of the content control when its type is `ComboBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.9] - */ - comboBoxContentControl?: Word.Interfaces.ComboBoxContentControlData; - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - - /** - * Gets the data of the content control when its type is `DropDownList`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.9] - */ - dropDownListContentControl?: Word.Interfaces.DropDownListContentControlData; - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - } - /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ - export interface ContentControlCollectionData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ - export interface ContentControlListItemData { - /** - * Specifies the display text of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - displayText?: string; - /** - * Specifies the index location of a content control list item in the collection of list items. - * - * @remarks - * [Api set: WordApi 1.9] - */ - index?: number; - /** - * Specifies the programmatic value of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - value?: string; - } - /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ - export interface ContentControlListItemCollectionData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface describing the data returned by calling `customProperty.toJSON()`. */ - export interface CustomPropertyData { - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ - export interface CustomPropertyCollectionData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ - export interface CustomXmlPartData { - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: string; - - } - /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ - export interface CustomXmlPartCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ - export interface CustomXmlPartScopedCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `document.toJSON()`. */ - export interface DocumentData { - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - activeWindow?: Word.Interfaces.WindowData; - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - windows?: Word.Interfaces.WindowData[]; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ - export interface DocumentCreatedData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ - export interface DocumentPropertiesData { - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - customProperties?: Word.Interfaces.CustomPropertyData[]; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ - export interface DropDownListContentControlData { - } - /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ - export interface ComboBoxContentControlData { - } - /** An interface describing the data returned by calling `field.toJSON()`. */ - export interface FieldData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - } - /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ - export interface FieldCollectionData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface describing the data returned by calling `font.toJSON()`. */ - export interface FontData { - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface describing the data returned by calling `hyperlink.toJSON()`. */ - export interface HyperlinkData { - - - - - - - - - - - } - /** An interface describing the data returned by calling `hyperlinkCollection.toJSON()`. */ - export interface HyperlinkCollectionData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ - export interface InlinePictureData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ - export interface InlinePictureCollectionData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface describing the data returned by calling `list.toJSON()`. */ - export interface ListData { - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: Word.ListLevelType[]; - } - /** An interface describing the data returned by calling `listCollection.toJSON()`. */ - export interface ListCollectionData { - items?: Word.Interfaces.ListData[]; - } - /** An interface describing the data returned by calling `listItem.toJSON()`. */ - export interface ListItemData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: number; - } - /** An interface describing the data returned by calling `listLevel.toJSON()`. */ - export interface ListLevelData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ - export interface ListLevelCollectionData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ - export interface ListTemplateData { - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listLevels?: Word.Interfaces.ListLevelData[]; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface describing the data returned by calling `noteItem.toJSON()`. */ - export interface NoteItemData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeData; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.NoteItemType | "Footnote" | "Endnote"; - } - /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ - export interface NoteItemCollectionData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface describing the data returned by calling `page.toJSON()`. */ - export interface PageData { - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** An interface describing the data returned by calling `pageCollection.toJSON()`. */ - export interface PageCollectionData { - items?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `pane.toJSON()`. */ - export interface PaneData { - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pagesEnclosingViewport?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `paneCollection.toJSON()`. */ - export interface PaneCollectionData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface describing the data returned by calling `window.toJSON()`. */ - export interface WindowData { - } - /** An interface describing the data returned by calling `windowCollection.toJSON()`. */ - export interface WindowCollectionData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface describing the data returned by calling `paragraph.toJSON()`. */ - export interface ParagraphData { - - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemData; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: string; - } - /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ - export interface ParagraphCollectionData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ - export interface ParagraphFormatData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface describing the data returned by calling `range.toJSON()`. */ - export interface RangeData { - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - } - /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ - export interface RangeCollectionData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ - export interface SearchOptionsData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface describing the data returned by calling `section.toJSON()`. */ - export interface SectionData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - - - - } - /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ - export interface SectionCollectionData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface describing the data returned by calling `setting.toJSON()`. */ - export interface SettingData { - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ - export interface SettingCollectionData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ - export interface StyleCollectionData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface describing the data returned by calling `style.toJSON()`. */ - export interface StyleData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderData[]; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface describing the data returned by calling `shading.toJSON()`. */ - export interface ShadingData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface describing the data returned by calling `shadingUniversal.toJSON()`. */ - export interface ShadingUniversalData { - - - - - - } - /** An interface describing the data returned by calling `table.toJSON()`. */ - export interface TableData { - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rows?: Word.Interfaces.TableRowData[]; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ - export interface TableStyleData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ - export interface TableCollectionData { - items?: Word.Interfaces.TableData[]; - } - /** An interface describing the data returned by calling `tableColumn.toJSON()`. */ - export interface TableColumnData { - - - - - - - - - - } - /** An interface describing the data returned by calling `tableColumnCollection.toJSON()`. */ - export interface TableColumnCollectionData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface describing the data returned by calling `tableRow.toJSON()`. */ - export interface TableRowData { - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cells?: Word.Interfaces.TableCellData[]; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ - export interface TableRowCollectionData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface describing the data returned by calling `tableCell.toJSON()`. */ - export interface TableCellData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ - export interface TableCellCollectionData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ - export interface TableBorderData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `template.toJSON()`. */ - export interface TemplateData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `templateCollection.toJSON()`. */ - export interface TemplateCollectionData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ - export interface TrackedChangeData { - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - } - /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ - export interface TrackedChangeCollectionData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface describing the data returned by calling `shape.toJSON()`. */ - export interface ShapeData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ - export interface ShapeGroupData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `canvas.toJSON()`. */ - export interface CanvasData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ - export interface ShapeCollectionData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ - export interface ShapeFillData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - } - /** An interface describing the data returned by calling `textFrame.toJSON()`. */ - export interface TextFrameData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface describing the data returned by calling `shapeTextWrap.toJSON()`. */ - export interface ShapeTextWrapData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface describing the data returned by calling `repeatingSectionItem.toJSON()`. */ - export interface RepeatingSectionItemData { - - } - /** An interface describing the data returned by calling `datePickerContentControl.toJSON()`. */ - export interface DatePickerContentControlData { - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `pictureContentControl.toJSON()`. */ - export interface PictureContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `groupContentControl.toJSON()`. */ - export interface GroupContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockGalleryContentControl.toJSON()`. */ - export interface BuildingBlockGalleryContentControlData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `repeatingSectionContentControl.toJSON()`. */ - export interface RepeatingSectionContentControlData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frame.toJSON()`. */ - export interface FrameData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frameCollection.toJSON()`. */ - export interface FrameCollectionData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface describing the data returned by calling `documentLibraryVersion.toJSON()`. */ - export interface DocumentLibraryVersionData { - - - - } - /** An interface describing the data returned by calling `documentLibraryVersionCollection.toJSON()`. */ - export interface DocumentLibraryVersionCollectionData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface describing the data returned by calling `listFormat.toJSON()`. */ - export interface ListFormatData { - - - - - - - - - } - /** An interface describing the data returned by calling `fillFormat.toJSON()`. */ - export interface FillFormatData { - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `glowFormat.toJSON()`. */ - export interface GlowFormatData { - - - - } - /** An interface describing the data returned by calling `lineFormat.toJSON()`. */ - export interface LineFormatData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `reflectionFormat.toJSON()`. */ - export interface ReflectionFormatData { - - - - - - } - /** An interface describing the data returned by calling `colorFormat.toJSON()`. */ - export interface ColorFormatData { - - - - - - } - /** An interface describing the data returned by calling `shadowFormat.toJSON()`. */ - export interface ShadowFormatData { - - - - - - - - - - - - } - /** An interface describing the data returned by calling `threeDimensionalFormat.toJSON()`. */ - export interface ThreeDimensionalFormatData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `bibliography.toJSON()`. */ - export interface BibliographyData { - - - } - /** An interface describing the data returned by calling `sourceCollection.toJSON()`. */ - export interface SourceCollectionData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface describing the data returned by calling `source.toJSON()`. */ - export interface SourceData { - - - - } - /** An interface describing the data returned by calling `pageSetup.toJSON()`. */ - export interface PageSetupData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `lineNumbering.toJSON()`. */ - export interface LineNumberingData { - - - - - - } - /** An interface describing the data returned by calling `textColumnCollection.toJSON()`. */ - export interface TextColumnCollectionData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface describing the data returned by calling `textColumn.toJSON()`. */ - export interface TextColumnData { - - - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CritiqueAnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - range?: Word.Interfaces.RangeLoadOptions; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: boolean; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ApplicationLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface BodyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSection?: Word.Interfaces.SectionLoadOptions; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * For EACH ITEM in the collection: Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CheckboxContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentContentRangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: boolean; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * For EACH ITEM in the collection: Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * For EACH ITEM in the collection: Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - /** - * Represents a list item in a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - export interface ContentControlListItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the display text of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - displayText?: boolean; - /** - * Specifies the index location of a content control list item in the collection of list items. - * - * @remarks - * [Api set: WordApi 1.9] - */ - index?: boolean; - /** - * Specifies the programmatic value of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - value?: boolean; - } - /** - * Contains a collection of {@link Word.ContentControlListItem} objects that represent the items in a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - export interface ContentControlListItemCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the display text of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - displayText?: boolean; - /** - * For EACH ITEM in the collection: Specifies the index location of a content control list item in the collection of list items. - * - * @remarks - * [Api set: WordApi 1.9] - */ - index?: boolean; - /** - * For EACH ITEM in the collection: Specifies the programmatic value of a list item for a dropdown list or combo box content control. - * - * @remarks - * [Api set: WordApi 1.9] - */ - value?: boolean; - } - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartScopedCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface DocumentLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: boolean; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentCreatedLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentPropertiesLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: boolean; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: boolean; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: boolean; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: boolean; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: boolean; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: boolean; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: boolean; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: boolean; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: boolean; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: boolean; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: boolean; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: boolean; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: boolean; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: boolean; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: boolean; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: boolean; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: boolean; - } - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface FontLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: boolean; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: boolean; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: boolean; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: boolean; - - } - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: boolean; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: boolean; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: boolean; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListTemplateLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * For EACH ITEM in the collection: Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ParagraphFormatLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: boolean; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: boolean; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: boolean; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: boolean; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: boolean; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SearchOptionsLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface StyleCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * For EACH ITEM in the collection: Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface StyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ShadingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: boolean; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: boolean; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: boolean; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TableStyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: boolean; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: boolean; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: boolean; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * For EACH ITEM in the collection: Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableBorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: boolean; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * For EACH ITEM in the collection: Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeGroupLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface CanvasLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * For EACH ITEM in the collection: Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * For EACH ITEM in the collection: Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * For EACH ITEM in the collection: Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * For EACH ITEM in the collection: Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * For EACH ITEM in the collection: The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * For EACH ITEM in the collection: The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * For EACH ITEM in the collection: The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeFillLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: boolean; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: boolean; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: boolean; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface TextFrameLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: boolean; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: boolean; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: boolean; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: boolean; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: boolean; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: boolean; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: boolean; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeTextWrapLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: boolean; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: boolean; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: boolean; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - - - - - - - - - - - - - - - - - - - - - - - - - - } -} -export declare namespace Word { - /** - * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. - */ - export class RequestContext extends OfficeExtension.ClientRequestContext { - constructor(url?: string); - readonly document: Document; - /** [Api set: WordApi 1.3] **/ - readonly application: Application; - } - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. - * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(batch: (context: Word.RequestContext) => Promise): Promise; -} - - -//////////////////////////////////////////////////////////////// -//////////////////////// End Word APIs ///////////////////////// -//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop2.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop2.d.ts deleted file mode 100644 index ed9678115f..0000000000 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop2.d.ts +++ /dev/null @@ -1,27130 +0,0 @@ -import { OfficeExtension } from "../../api-extractor-inputs-office/office" -import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" -//////////////////////////////////////////////////////////////// -/////////////////////// Begin Word APIs //////////////////////// -//////////////////////////////////////////////////////////////// - -export declare namespace Word { - /** - * Represents the color scheme of a critique in the document, affecting underline and highlight. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum CritiqueColorScheme { - /** - * Red color. - * @remarks - * [Api set: WordApi 1.7] - */ - red = "Red", - /** - * Green color. - * @remarks - * [Api set: WordApi 1.7] - */ - green = "Green", - /** - * Blue color. - * @remarks - * [Api set: WordApi 1.7] - */ - blue = "Blue", - /** - * Lavender color. - * @remarks - * [Api set: WordApi 1.7] - */ - lavender = "Lavender", - /** - * Berry color. - * @remarks - * [Api set: WordApi 1.7] - */ - berry = "Berry", - } - /** - * Properties defining the behavior of the pop-up menu for a given critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface CritiquePopupOptions { - /** - * Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in icon in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - brandingTextResourceId: string; - /** - * Gets the manifest resource ID of the string to use as the subtitle. - * - * @remarks - * [Api set: WordApi 1.8] - */ - subtitleResourceId: string; - /** - * Gets the suggestions to display in the critique pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - suggestions: string[]; - /** - * Gets the manifest resource ID of the string to use as the title. - * - * @remarks - * [Api set: WordApi 1.8] - */ - titleResourceId: string; - } - /** - * Critique that will be rendered as underline for the specified part of paragraph in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface Critique { - /** - * Specifies the color scheme of the critique. - * - * @remarks - * [Api set: WordApi 1.7] - */ - colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; - /** - * Specifies the length of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - length: number; - /** - * Specifies the behavior of the pop-up menu for the critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - popupOptions?: Word.CritiquePopupOptions; - /** - * Specifies the start index of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - start: number; - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CritiqueAnnotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly range: Word.Range; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critique: Word.Critique; - /** - * Accepts the critique. This will change the annotation state to `accepted`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - accept(): void; - /** - * Rejects the critique. This will change the annotation state to `rejected`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CritiqueAnnotation; - /** - * 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. - */ - track(): Word.CritiqueAnnotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CritiqueAnnotation; - /** - * 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's passed to it.) - * Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CritiqueAnnotationData; - } - /** - * Represents the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum AnnotationState { - /** - * Created. - * @remarks - * [Api set: WordApi 1.7] - */ - created = "Created", - /** - * Accepted. - * @remarks - * [Api set: WordApi 1.7] - */ - accepted = "Accepted", - /** - * Rejected. - * @remarks - * [Api set: WordApi 1.7] - */ - rejected = "Rejected", - } - /** - * Annotations set produced by the add-in. Currently supporting only critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationSet { - /** - * Critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiques: Word.Critique[]; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class Annotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critiqueAnnotation: Word.CritiqueAnnotation; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly id: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - /** - * Deletes the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Annotation; - /** - * 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. - */ - track(): Word.Annotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Annotation; - /** - * 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's passed to it.) - * Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.AnnotationData; - } - /** - * Holds annotation information that is passed back on annotation added event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationInsertedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation inserted event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationClickedEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Holds annotation information that is passed back on annotation removed event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationRemovedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation hovered event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationHoveredEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Represents action information that's passed back on annotation pop-up action event. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface AnnotationPopupActionEventArgs { - /** - * Specifies the chosen action in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - action: string; - /** - * Specifies the accepted suggestion (only populated when accepting a critique suggestion). - * - * @remarks - * [Api set: WordApi 1.8] - */ - critiqueSuggestion: string; - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.8] - */ - id: string; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class AnnotationCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Annotation[]; - /** - * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirst(): Word.Annotation; - /** - * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. - For further information, - see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirstOrNullObject(): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; - /** - * 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. - */ - track(): Word.AnnotationCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.AnnotationCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.AnnotationCollectionData; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Application extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Application): void; - /** - * Creates a new document by using an optional Base64-encoded .docx file. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param base64File - Optional. The Base64-encoded .docx file. The default value is null. - */ - createDocument(base64File?: string): Word.DocumentCreated; - /** - * Opens a document and displays it in a new tab or window. - The following are examples for the various supported clients and platforms. - - - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` - - - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` - - - Local location example for Mac and iOS: `/User/someone/document.docx` - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param filePath - Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. - */ - openDocument(filePath: string): void; - /** - * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param base64File - Required. The template file. - */ - retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ApplicationLoadOptions): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Application; - /** - * Create a new instance of the `Word.Application` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; - /** - * 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's passed to it.) - * Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ApplicationData; - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Body extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBodyOrNullObject: Word.Body; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSection: Word.Section; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSectionOrNullObject: Word.Section; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Body): void; - /** - * Clears the contents of the body object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Gets comments associated with the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the body. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the OOXML (Office Open XML) representation of the body object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole body, or the starting or ending point of the body, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the collection of the TrackedChange objects in the body. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; - /** - * Wraps the Body object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the document. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; - /** - * Inserts text into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. Can be a maximum of 255 characters. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Body; - /** - * 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. - */ - track(): Word.Body; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Body; - /** - * 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's passed to it.) - * Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BodyData; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class Border extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly location: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Border): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderLoadOptions): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Border; - /** - * 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. - */ - track(): Word.Border; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Border; - /** - * 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's passed to it.) - * Whereas the original `Word.Border` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BorderData; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class BorderCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Border[]; - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Gets the border that has the specified location. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getByLocation(borderLocation: Word.BorderLocation.top | Word.BorderLocation.left | Word.BorderLocation.bottom | Word.BorderLocation.right | Word.BorderLocation.insideHorizontal | Word.BorderLocation.insideVertical | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical"): Word.Border; - /** - * Gets the first border in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.Border; - /** - * Gets the first border in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.Border; - /** - * Gets a Border object by its index in the collection. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param index - A number that identifies the index location of a Border object. - */ - getItem(index: number): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.BorderCollection; - /** - * 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. - */ - track(): Word.BorderCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.BorderCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.BorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.BorderCollectionData; - } - - - - - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CheckboxContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CheckboxContentControl): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CheckboxContentControl; - /** - * 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. - */ - track(): Word.CheckboxContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CheckboxContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CheckboxContentControlData; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Comment extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly replies: Word.CommentReplyCollection; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Comment): void; - /** - * Deletes the comment and its replies. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Gets the range in the main document where the comment is on. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getRange(): Word.Range; - /** - * Adds a new reply to the end of the comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param replyText - Required. Reply text. - */ - reply(replyText: string): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Comment; - /** - * 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. - */ - track(): Word.Comment; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Comment; - /** - * 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's passed to it.) - * Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentData; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Comment[]; - /** - * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Comment; - /** - * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; - /** - * 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. - */ - track(): Word.CommentCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentCollectionData; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentContentRange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly isEmpty: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly text: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentContentRange): void; - /** - * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param text - Required. The text to be inserted in to the CommentContentRange. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentContentRange; - /** - * 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. - */ - track(): Word.CommentContentRange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentContentRange; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentContentRangeData; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReply extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentComment: Word.Comment; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentReply): void; - /** - * Deletes the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentReply; - /** - * 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. - */ - track(): Word.CommentReply; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReply; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentReplyData; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReplyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CommentReply[]; - /** - * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.CommentReply; - /** - * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; - /** - * 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. - */ - track(): Word.CommentReplyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReplyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentReplyCollectionData; - } - - - - - - - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly checkboxContentControl: Word.CheckboxContentControl; - - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - - - /** - * Gets the collection of endnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly id: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ContentControl): void; - /** - * Clears the contents of the content control. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param keepContent - Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. - */ - delete(keepContent: boolean): void; - /** - * Gets comments associated with the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported child content controls in this content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the Office Open XML (OOXML) representation of the content control object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole content control, or the starting or ending point of the content control, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the content control. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. Type of break. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; - /** - * Inserts a document into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts an inline picture into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns into, or next to, a content control. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. The text to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the content control into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ContentControl; - /** - * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDataChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDeleted: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is entered. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onEntered: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is exited, for example, when the cursor leaves the content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onExited: OfficeExtension.EventHandlers; - /** - * Occurs when selection within the content control is changed. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onSelectionChanged: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.ContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ContentControlData; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControlCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ContentControl[]; - /** - * Gets the content controls that have the specified tracking state. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param changeTrackingStates - Required. An array of content control change tracking states. - */ - getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; - /** - * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - Required. A content control identifier. - */ - getById(id: number): Word.ContentControl; - /** - * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A content control identifier. - */ - getByIdOrNullObject(id: number): Word.ContentControl; - /** - * Gets the content controls that have the specified tag. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param tag - Required. A tag set on a content control. - */ - getByTag(tag: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified title. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param title - Required. The title of a content control. - */ - getByTitle(title: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified types. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param types - Required. An array of content control types. - */ - getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; - /** - * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.ContentControl; - /** - * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.ContentControl; - /** - * Gets a content control by its ID. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - The content control's ID. - */ - getItem(id: number): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; - /** - * 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. - */ - track(): Word.ContentControlCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControlCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ContentControlCollectionData; - } - - - /** - * Specifies the options that define which content controls are returned. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlOptions { - /** - * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. - * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. - */ - types: Word.ContentControlType[]; - } - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomProperty extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly key: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomProperty): void; - /** - * Deletes the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomProperty; - /** - * 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. - */ - track(): Word.CustomProperty; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomProperty; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomPropertyData; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomPropertyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomProperty[]; - /** - * Creates a new or sets an existing custom property. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The custom property's key, which is case-insensitive. - * @param value - Required. The custom property's value. - */ - add(key: string, value: any): Word.CustomProperty; - /** - * Deletes all custom properties in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteAll(): void; - /** - * Gets the count of custom properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - The key that identifies the custom property object. - */ - getItem(key: string): Word.CustomProperty; - /** - * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The key that identifies the custom property object. - */ - getItemOrNullObject(key: string): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; - /** - * 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. - */ - track(): Word.CustomPropertyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomPropertyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomPropertyCollectionData; - } - - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPart extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly namespaceUri: string; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomXmlPartUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomXmlPart): void; - - /** - * Deletes the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Deletes an attribute with the given name from the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - */ - deleteAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string): void; - /** - * Deletes the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - deleteElement(xpath: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Gets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getXml(): OfficeExtension.ClientResult; - /** - * Inserts an attribute with the given name and value to the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. Value of the attribute. - */ - insertAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Inserts the given XML under the parent element identified by xpath at child position index. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single parent element in XPath notation. - * @param xml - Required. XML content to be inserted. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param index - Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. - */ - insertElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }, index?: number): void; - - /** - * Queries the XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. An XPath query. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @returns An array where each item represents an entry matched by the XPath query. - */ - query(xpath: string, namespaceMappings: { - [key: string]: string; - }): OfficeExtension.ClientResult; - - - /** - * Sets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content to be set. - */ - setXml(xml: string): void; - /** - * Updates the value of an attribute with the given name of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. New value of the attribute. - */ - updateAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Updates the XML of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param xml - Required. New XML content to be stored. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - updateElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomXmlPart; - /** - * 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. - */ - track(): Word.CustomXmlPart; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPart; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomXmlPartData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Adds a new custom XML part to the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content. Must be a valid XML fragment. - */ - add(xml: string): Word.CustomXmlPart; - /** - * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param namespaceUri - Required. The namespace URI. - */ - getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID or index of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartCollectionData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItem(): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItemOrNullObject(): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartScopedCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartScopedCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Document extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activeWindow: Word.Window; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly windows: Word.WindowCollection; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Document): void; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: Word.StyleType): Word.Style; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: Word.CloseBehavior): void; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: "Save" | "SkipSave"): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param filePath - Required. The path of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specifies the behavior of comparing document. - */ - compare(filePath: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64File - Required. The Base64-encoded content of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specify the behavior for comparing the documents. Note that the `compareTarget` option isn't allowed to be `CompareTargetSelected` in this API. - */ - compareFromBase64(base64File: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - - /** - * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param id - The ID of the annotation to get. - */ - getAnnotationById(id: string): Word.Annotation; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - /** - * Gets the currently supported content controls in the document. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets the document's endnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getEndnoteBody(): Word.Body; - /** - * Gets the document's footnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFootnoteBody(): Word.Body; - /** - * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param id - Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. - */ - getParagraphByUniqueLocalId(id: string): Word.Paragraph; - /** - * Gets the current selection of the document. Multiple selections aren't supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getSelection(): Word.Range; - /** - * Gets a StyleCollection object that represents the whole style set of the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getStyles(): Word.StyleCollection; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; - /** - * Inserts a document into the target document at a specific location with additional properties. - Headers, footers, watermarks, and other section properties are copied by default. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; - - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Document; - /** - * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationClicked: OfficeExtension.EventHandlers; - /** - * Occurs when the user hovers the cursor over an annotation. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationHovered: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationInserted: OfficeExtension.EventHandlers; - /** - * Occurs when the user performs an action in an annotation pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - * - * @eventproperty - */ - readonly onAnnotationPopupAction: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationRemoved: OfficeExtension.EventHandlers; - /** - * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onContentControlAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds new paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user changes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphDeleted: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.Document; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Document; - /** - * 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's passed to it.) - * Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentData; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentCreated extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentCreated): void; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: Word.StyleType): Word.Style; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - /** - * Gets the currently supported content controls in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets a StyleCollection object that represents the whole style set of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - */ - getStyles(): Word.StyleCollection; - /** - * Inserts a document into the target document at a specific location with additional properties. - Headers, footers, watermarks, and other section properties are copied by default. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.5] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; - /** - * Opens the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - open(): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentCreated; - /** - * 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. - */ - track(): Word.DocumentCreated; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentCreated; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentCreatedData; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentProperties extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly customProperties: Word.CustomPropertyCollection; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly applicationName: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly creationDate: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastAuthor: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastPrintDate: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastSaveTime: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly revisionNumber: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly security: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly template: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentProperties): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentProperties; - /** - * 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. - */ - track(): Word.DocumentProperties; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentProperties; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentPropertiesData; - } - - - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class Field extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly result: Word.Range; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Field): void; - /** - * Deletes the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNext(): Word.Field; - /** - * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNextOrNullObject(): Word.Field; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Updates the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - updateResult(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Field; - /** - * 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. - */ - track(): Word.Field; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Field; - /** - * 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's passed to it.) - * Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FieldData; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class FieldCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Field[]; - /** - * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Field; - /** - * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Field; - /** - * Gets the Field object collection including the specified types of fields. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param types - Required. An array of field types. - */ - getByTypes(types: Word.FieldType[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; - /** - * 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. - */ - track(): Word.FieldCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.FieldCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.FieldCollectionData; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Font extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Font): void; - - - - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FontLoadOptions): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Font; - /** - * 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. - */ - track(): Word.Font; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Font; - /** - * 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's passed to it.) - * Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FontData; - } - - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePicture extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly paragraph: Word.Paragraph; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly imageFormat: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.InlinePicture): void; - /** - * Deletes the inline picture from the document. - * - * @remarks - * [Api set: WordApi 1.2] - */ - delete(): void; - /** - * Gets the Base64-encoded string representation of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getBase64ImageSrc(): OfficeExtension.ClientResult; - /** - * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.InlinePicture; - /** - * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.InlinePicture; - /** - * Gets the picture, or the starting or ending point of the picture, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Wraps the inline picture with a rich text content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts an inline picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.InlinePicture; - /** - * 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. - */ - track(): Word.InlinePicture; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePicture; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.InlinePictureData; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePictureCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.InlinePicture[]; - /** - * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.InlinePicture; - /** - * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; - /** - * 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. - */ - track(): Word.InlinePictureCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePictureCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.InlinePictureCollectionData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class List extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly id: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelExistences: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelTypes: Word.ListLevelType[]; - /** - * Gets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelFont(level: number): Word.Font; - /** - * Gets the paragraphs that occur at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelParagraphs(level: number): Word.ParagraphCollection; - /** - * Gets the Base64-encoded string representation of the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelPicture(level: number): OfficeExtension.ClientResult; - /** - * Gets the bullet, number, or picture at the specified level as a string. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelString(level: number): OfficeExtension.ClientResult; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Resets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param resetFontName - Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. - */ - resetLevelFont(level: number, resetFontName?: boolean): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: Word.Alignment): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; - /** - * Sets the two indents of the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param textIndent - Required. The text indent in points. It is the same as paragraph left indent. - * @param bulletNumberPictureIndent - Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. - */ - setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; - /** - * Sets the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param base64EncodedImage - Optional. The Base64-encoded image to be set. If not given, the default picture is set. - */ - setLevelPicture(level: number, base64EncodedImage?: string): void; - /** - * Sets the starting number at the specified level in the list. Default value is 1. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param startingNumber - Required. The number to start with. - */ - setLevelStartingNumber(level: number, startingNumber: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLoadOptions): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.List; - /** - * 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. - */ - track(): Word.List; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.List; - /** - * 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's passed to it.) - * Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListData; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.List[]; - /** - * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getById(id: number): Word.List; - /** - * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getByIdOrNullObject(id: number): Word.List; - /** - * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.List; - /** - * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.List; - /** - * Gets a list object by its ID. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - The list's ID. - */ - getItem(id: number): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; - /** - * 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. - */ - track(): Word.ListCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListCollectionData; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listString: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly siblingIndex: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListItem): void; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestor(parentOnly?: boolean): Word.Paragraph; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; - /** - * Gets all descendant list items of the list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param directChildrenOnly - Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. - */ - getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListItem; - /** - * 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. - */ - track(): Word.ListItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListItem; - /** - * 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's passed to it.) - * Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListItemData; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevel extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly font: Word.Font; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListLevel): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListLevel; - /** - * 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. - */ - track(): Word.ListLevel; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevel; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevel` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListLevelData; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevelCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ListLevel[]; - /** - * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.ListLevel; - /** - * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; - /** - * 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. - */ - track(): Word.ListLevelCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevelCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListLevelCollectionData; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListTemplate extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listLevels: Word.ListLevelCollection; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListTemplate): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListTemplate; - /** - * 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. - */ - track(): Word.ListTemplate; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListTemplate; - /** - * 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's passed to it.) - * Whereas the original `Word.ListTemplate` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListTemplateData; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly body: Word.Body; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly reference: Word.Range; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.NoteItemType | "Footnote" | "Endnote"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.NoteItem): void; - /** - * Deletes the note item. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNext(): Word.NoteItem; - /** - * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNextOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.NoteItem; - /** - * 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. - */ - track(): Word.NoteItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItem; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.NoteItemData; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItemCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.NoteItem[]; - /** - * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirst(): Word.NoteItem; - /** - * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirstOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; - /** - * 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. - */ - track(): Word.NoteItemCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItemCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.NoteItemCollectionData; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Page extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly height: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly index: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly width: number; - /** - * Gets the next page in the pane. Throws an `ItemNotFound` error if this page is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Page; - /** - * Gets the next page. If this page is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Page; - /** - * Gets the whole page, or the starting or ending point of the page, as a range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageLoadOptions): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Page; - /** - * 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. - */ - track(): Word.Page; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Page; - /** - * 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's passed to it.) - * Whereas the original `Word.Page` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PageData; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PageCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Page[]; - /** - * Gets the first page in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Page; - /** - * Gets the first page in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PageCollection; - /** - * 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. - */ - track(): Word.PageCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PageCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PageCollectionData; - } - /** - * Represents a window pane. The `Pane` object is a member of the pane collection. The pane collection includes all the window panes for a single window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Pane extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pagesEnclosingViewport: Word.PageCollection; - /** - * Gets the next pane in the window. Throws an `ItemNotFound` error if this pane is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Pane; - /** - * Gets the next pane. If this pane is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Pane; - /** - * 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. - */ - track(): Word.Pane; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Pane; - /** - * 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's passed to it.) - * Whereas the original `Word.Pane` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PaneData; - } - /** - * Represents the collection of pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PaneCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Pane[]; - /** - * Gets the first pane in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Pane; - /** - * Gets the first pane in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PaneCollection; - /** - * 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. - */ - track(): Word.PaneCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PaneCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PaneCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PaneCollectionData; - } - /** - * Represents the window that displays the document. A window can be split to contain multiple reading panes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Window extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active pane in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activePane: Word.Pane; - /** - * Gets the collection of panes in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly panes: Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Window; - /** - * 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. - */ - track(): Word.Window; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Window; - /** - * 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's passed to it.) - * Whereas the original `Word.Window` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.WindowData; - } - /** - * Represents the collection of window objects. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class WindowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Window[]; - /** - * Gets the first window in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Window; - /** - * Gets the first window in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.WindowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.WindowCollection; - /** - * 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. - */ - track(): Word.WindowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.WindowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.WindowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.WindowCollectionData; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Paragraph extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the collection of content control objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly list: Word.List; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItem: Word.ListItem; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItemOrNullObject: Word.ListItem; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listOrNullObject: Word.List; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isLastParagraph: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isListItem: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tableNestingLevel: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly uniqueLocalId: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Paragraph): void; - /** - * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param listId - Required. The ID of an existing list. - * @param level - Required. The level in the list. - */ - attachToList(listId: number, level: number): Word.List; - /** - * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the paragraph and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - /** - * Moves this paragraph out of its list, if the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - detachFromList(): void; - /** - * Gets annotations set on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - */ - getAnnotations(): Word.AnnotationCollection; - /** - * Gets comments associated with the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Paragraph; - /** - * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Paragraph; - /** - * Gets the Office Open XML (OOXML) representation of the paragraph object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPrevious(): Word.Paragraph; - /** - * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPreviousOrNullObject(): Word.Paragraph; - /** - * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). - By default, hidden text and text marked as deleted are excluded. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param options - Optional. Options that define whether the final result should include hidden text and text marked as deleted. - */ - getText(options?: Word.GetTextOptions | { - IncludeHiddenText?: boolean; - IncludeTextMarkedAsDeleted?: boolean; - }): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts annotations on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - * - * @param annotations - Annotations to set. - * @returns An array of the inserted annotations identifiers. - */ - insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the document. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Wraps the Paragraph object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Optional. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the paragraph into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Starts a new list with this paragraph. Fails if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - startNewList(): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Paragraph; - /** - * 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. - */ - track(): Word.Paragraph; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Paragraph; - /** - * 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's passed to it.) - * Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ParagraphCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Paragraph[]; - /** - * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Paragraph; - /** - * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLast(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLastOrNullObject(): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; - /** - * 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. - */ - track(): Word.ParagraphCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ParagraphCollectionData; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class ParagraphFormat extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ParagraphFormat): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ParagraphFormat; - /** - * 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. - */ - track(): Word.ParagraphFormat; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphFormat; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphFormatData; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Range extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of content control objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly inlinePictures: Word.InlinePictureCollection; - - /** - * Gets the collection of list objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the collection of paragraph objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - - /** - * Gets the collection of table objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isEmpty: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Range): void; - /** - * Clears the contents of the range object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Compares this range's location with another range's location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. The range to compare with this range. - */ - compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; - /** - * Deletes the range and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges don't have a union. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandTo(range: Word.Range): Word.Range; - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandToOrNullObject(range: Word.Range): Word.Range; - /** - * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param includeHidden - Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. - * @param includeAdjacent - Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. - */ - getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; - /** - * Gets comments associated with the range. - * - * @remarks - * [Api set: WordApi 1.4] - * @returns - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets hyperlink child ranges within the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getHyperlinkRanges(): Word.RangeCollection; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the OOXML representation of the range object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Clones the range, or gets the starting or ending point of the range as a new range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the range. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Highlights the range temporarily without changing document content. - To highlight the text permanently, set the range's Font.HighlightColor. - * - * @remarks - * [Api set: WordApi 1.8] - */ - highlight(): void; - /** - * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - insertBookmark(name: string): void; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of the canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Insert a comment on the range. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param commentText - Required. The comment text to be inserted. - * @returns comment object - */ - insertComment(commentText: string): Word.Comment; - /** - * Wraps the Range object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts an endnote. The endnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the endnote body. The default is "". - */ - insertEndnote(insertText?: string): Word.NoteItem; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a footnote. The footnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the footnote body. The default is "". - */ - insertFootnote(insertText?: string): Word.NoteItem; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Required. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWith(range: Word.Range): Word.Range; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWithOrNullObject(range: Word.Range): Word.Range; - /** - * Removes the highlight added by the Highlight function if any. - * - * @remarks - * [Api set: WordApi 1.8] - */ - removeHighlight(): void; - /** - * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the range into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Range; - /** - * 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. - */ - track(): Word.Range; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Range; - /** - * 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's passed to it.) - * Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.RangeData; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class RangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Range[]; - /** - * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Range; - /** - * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; - /** - * 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. - */ - track(): Word.RangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.RangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.RangeCollectionData; - } - /** - * Specifies the options to determine location and size when inserting a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface InsertShapeOptions { - /** - * Represents the height of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Represents the left position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * Represents the top position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * Represents the width of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** - * Specifies the options to determine what to copy when inserting a file. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface InsertFileOptions { - /** - * Represents whether the change tracking mode status from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importChangeTrackingMode?: boolean; - /** - * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomProperties?: boolean; - /** - * Represents whether the custom XML parts from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomXmlParts?: boolean; - /** - * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - importDifferentOddEvenPages?: boolean; - /** - * Represents whether the page color and other background information from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importPageColor?: boolean; - /** - * Represents whether the paragraph spacing from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importParagraphSpacing?: boolean; - /** - * Represents whether the styles from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importStyles?: boolean; - /** - * Represents whether the theme from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importTheme?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SearchOptions extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.SearchOptions): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.SearchOptions; - /** - * Create a new instance of the `Word.SearchOptions` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - /** - * 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's passed to it.) - * Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SearchOptionsData; - } - /** - * Specifies the options to be included in a getText operation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface GetTextOptions { - /** - * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeHiddenText?: boolean; - /** - * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeTextMarkedAsDeleted?: boolean; - } - /** - * Specifies the options to be included in a compare document operation. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface DocumentCompareOptions { - /** - * True adds the document to the list of recently used files on the File menu. The default value is True. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - addToRecentFiles?: boolean; - /** - * The reviewer name associated with the differences generated by the comparison. - If unspecified, the value defaults to the author name of the revised document or the string "Comparison" if no author information is present. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - authorName?: string; - /** - * The target document for the comparison. Default value is 'CompareTargetCurrent'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTarget?: Word.CompareTarget | "CompareTargetCurrent" | "CompareTargetSelected" | "CompareTargetNew"; - /** - * True (default) for the comparison to include detection of format changes. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - detectFormatChanges?: boolean; - /** - * True compares the documents without notifying a user of problems. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignoreAllComparisonWarnings?: boolean; - /** - * True removes date and time stamp information from tracked changes in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removeDateAndTime?: boolean; - /** - * True removes all user information from comments, revisions, and the properties dialog box in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removePersonalInformation?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Section extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Section): void; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Section; - /** - * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Section; - /** - * 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. - */ - track(): Word.Section; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Section; - /** - * 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's passed to it.) - * Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SectionData; - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SectionCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Section[]; - /** - * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Section; - /** - * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; - /** - * 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. - */ - track(): Word.SectionCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SectionCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SectionCollectionData; - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Setting extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly key: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Setting): void; - /** - * Deletes the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Setting; - /** - * 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. - */ - track(): Word.Setting; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Setting; - /** - * 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's passed to it.) - * Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SettingData; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class SettingCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Setting[]; - /** - * Creates a new setting or sets an existing setting. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The setting's key, which is case-sensitive. - * @param value - Required. The setting's value. - */ - add(key: string, value: any): Word.Setting; - /** - * Deletes all settings in this add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - deleteAll(): void; - /** - * Gets the count of settings. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - The key that identifies the setting object. - */ - getItem(key: string): Word.Setting; - /** - * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The key that identifies the setting object. - */ - getItemOrNullObject(key: string): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; - /** - * 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. - */ - track(): Word.SettingCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SettingCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SettingCollectionData; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class StyleCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Style[]; - /** - * Get the style object by its name. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByName(name: string): Word.Style; - /** - * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByNameOrNullObject(name: string): Word.Style; - /** - * Gets the number of the styles in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a style object by its index in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param index - A number that identifies the index location of a style object. - */ - getItem(index: number): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; - /** - * 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. - */ - track(): Word.StyleCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.StyleCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.StyleCollectionData; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Style extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly borders: Word.BorderCollection; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly font: Word.Font; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listTemplate: Word.ListTemplate; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly paragraphFormat: Word.ParagraphFormat; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly shading: Word.Shading; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly tableStyle: Word.TableStyle; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly builtIn: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly inUse: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly linked: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly nameLocal: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Style): void; - /** - * Deletes the style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Style; - /** - * 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. - */ - track(): Word.Style; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Style; - /** - * 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's passed to it.) - * Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.StyleData; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class Shading extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shading): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shading; - /** - * 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. - */ - track(): Word.Shading; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shading; - /** - * 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's passed to it.) - * Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShadingData; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Table extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of endnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rows: Word.TableRowCollection; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isUniform: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly nestingLevel: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowCount: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Table): void; - /** - * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; - /** - * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Autofits the table columns to the width of the window. - * - * @remarks - * [Api set: WordApi 1.3] - */ - autoFitWindow(): void; - /** - * Clears the contents of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Deletes specific columns. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param columnIndex - Required. The first column to delete. - * @param columnCount - Optional. The number of columns to delete. Default 1. - */ - deleteColumns(columnIndex: number, columnCount?: number): void; - /** - * Deletes specific rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The first row to delete. - * @param rowCount - Optional. The number of rows to delete. Default 1. - */ - deleteRows(rowIndex: number, rowCount?: number): void; - /** - * Distributes the column widths evenly. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - distributeColumns(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCell(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Table; - /** - * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Table; - /** - * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfter(): Word.Paragraph; - /** - * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfterOrNullObject(): Word.Paragraph; - /** - * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBefore(): Word.Paragraph; - /** - * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBeforeOrNullObject(): Word.Paragraph; - /** - * Gets the range that contains this table, or the range at the start or end of the table. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; - /** - * Inserts a content control on the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Merges the cells bounded inclusively by a first and last cell. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param topRow - Required. The row of the first cell - * @param firstCell - Required. The index of the first cell in its row - * @param bottomRow - Required. The row of the last cell - * @param lastCell - Required. The index of the last cell in its row - */ - mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableLoadOptions): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Table; - /** - * 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. - */ - track(): Word.Table; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Table; - /** - * 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's passed to it.) - * Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableData; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TableStyle extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableStyle): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableStyle; - /** - * 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. - */ - track(): Word.TableStyle; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableStyle; - /** - * 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's passed to it.) - * Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableStyleData; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Table[]; - /** - * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Table; - /** - * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; - /** - * 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. - */ - track(): Word.TableCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCollectionData; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRow extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cells: Word.TableCellCollection; - /** - * Gets the collection of endnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellCount: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isHeader: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableRow): void; - /** - * Clears the contents of the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableRow; - /** - * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableRow; - /** - * Inserts a content control on the row. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add - * @param values - Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Merges the row into one cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - merge(): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableRow; - /** - * 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. - */ - track(): Word.TableRow; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRow; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableRowData; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableRow[]; - /** - * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableRow; - /** - * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; - /** - * 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. - */ - track(): Word.TableRowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableRowCollectionData; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCell extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly body: Word.Body; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentRow: Word.TableRow; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellIndex: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableCell): void; - /** - * Deletes the column containing this cell. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteColumn(): void; - /** - * Deletes the row containing this cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteRow(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableCell; - /** - * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableCell; - /** - * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; - /** - * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Splits the cell into the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param rowCount - Required. The number of rows to split into. Must be a divisor of the number of underlying rows. - * @param columnCount - Required. The number of columns to split into. - */ - split(rowCount: number, columnCount: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableCell; - /** - * 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. - */ - track(): Word.TableCell; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCell; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableCellData; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCellCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableCell[]; - /** - * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableCell; - /** - * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; - /** - * 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. - */ - track(): Word.TableCellCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCellCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCellCollectionData; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableBorder extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableBorder): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableBorder; - /** - * 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. - */ - track(): Word.TableBorder; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableBorder; - /** - * 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's passed to it.) - * Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableBorderData; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly author: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly date: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly text: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - /** - * Accepts the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - accept(): void; - /** - * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNext(): Word.TrackedChange; - /** - * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNextOrNullObject(): Word.TrackedChange; - /** - * Gets the range of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Rejects the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TrackedChange; - /** - * 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. - */ - track(): Word.TrackedChange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChange; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TrackedChangeData; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TrackedChange[]; - /** - * Accepts all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - acceptAll(): void; - /** - * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirst(): Word.TrackedChange; - /** - * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirstOrNullObject(): Word.TrackedChange; - /** - * Rejects all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rejectAll(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; - /** - * 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. - */ - track(): Word.TrackedChangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TrackedChangeCollectionData; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Shape extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly body: Word.Body; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly canvas: Word.Canvas; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly fill: Word.ShapeFill; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentCanvas: Word.Shape; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentGroup: Word.Shape; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapeGroup: Word.ShapeGroup; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textFrame: Word.TextFrame; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textWrap: Word.ShapeTextWrap; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly isChild: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shape): void; - /** - * Deletes the shape and its content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - delete(): void; - /** - * Moves the shape horizontally by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved horizontally, in points. Use a positive value to move the shape right. Use a negative value to move the shape left. - */ - moveHorizontally(distance: number): void; - /** - * Moves the shape vertically by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved vertically, in points. Use a positive value to move the shape up. Use a negative value to move the shape down. - */ - moveVertically(distance: number): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Selects the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param selectMultipleShapes - Optional. Whether to select multiple floating shapes. The default value is false. - */ - select(selectMultipleShapes?: boolean): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeLoadOptions): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shape; - /** - * 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. - */ - track(): Word.Shape; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shape; - /** - * 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's passed to it.) - * Whereas the original `Word.Shape` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeData; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeGroup extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeGroupUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeGroup): void; - /** - * Ungroups any grouped shapes in the specified shape group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ungroup(): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeGroupLoadOptions): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeGroup; - /** - * 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. - */ - track(): Word.ShapeGroup; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeGroup; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeGroup` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeGroupData; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Canvas extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CanvasUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Canvas): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CanvasLoadOptions): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Canvas; - /** - * 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. - */ - track(): Word.Canvas; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Canvas; - /** - * 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's passed to it.) - * Whereas the original `Word.Canvas` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CanvasData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CanvasData; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Shape[]; - /** - * Gets the shapes that have the specified geometric types. Only applied to geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of geometric shape subtypes. - */ - getByGeometricTypes(types: Word.GeometricShapeType[]): Word.ShapeCollection; - /** - * Gets a shape by its identifier. Throws an `ItemNotFound` error if there isn't a shape with the identifier in this collection. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getById(id: number): Word.Shape; - /** - * Gets a shape by its identifier. If there isn't a shape with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getByIdOrNullObject(id: number): Word.Shape; - /** - * Gets the shapes by the identifiers. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param ids - Required. An array of shape identifiers. - */ - getByIds(ids: number[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified names. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param names - Required. An array of shape names. - */ - getByNames(names: string[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified types. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of shape types. - */ - getByTypes(types: Word.ShapeType[]): Word.ShapeCollection; - /** - * Gets the first shape in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Shape; - /** - * Gets the first shape in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Shape; - /** - * Groups floating shapes in this collection, inline shapes will be skipped. Returns a Shape object that represents the new group of shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group(): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ShapeCollection; - /** - * 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. - */ - track(): Word.ShapeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ShapeCollectionData; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeFill extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeFill): void; - /** - * Clears the fill formatting of this shape and set it to `Word.ShapeFillType.NoFill`; - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - clear(): void; - /** - * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Word.ShapeFillType.Solid`. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param color - A string that represents the fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - */ - setSolidColor(color: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeFillLoadOptions): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeFill; - /** - * 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. - */ - track(): Word.ShapeFill; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeFill; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeFillData; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class TextFrame extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly hasText: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TextFrameUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TextFrame): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TextFrameLoadOptions): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TextFrame; - /** - * 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. - */ - track(): Word.TextFrame; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TextFrame; - /** - * 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's passed to it.) - * Whereas the original `Word.TextFrame` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TextFrameData; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeTextWrap extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeTextWrapUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeTextWrap): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeTextWrapLoadOptions): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeTextWrap; - /** - * 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. - */ - track(): Word.ShapeTextWrap; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeTextWrap; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeTextWrap` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeTextWrapData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeTextWrapData; - } - - - - - - - - - - - - - - - /** - * Represents the possible change tracking modes. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingMode { - /** - * ChangeTracking is turned off. - * @remarks - * [Api set: WordApi 1.4] - */ - off = "Off", - /** - * ChangeTracking is turned on for everyone. - * @remarks - * [Api set: WordApi 1.4] - */ - trackAll = "TrackAll", - /** - * Tracking is turned on for my changes only. - * @remarks - * [Api set: WordApi 1.4] - */ - trackMineOnly = "TrackMineOnly", - } - /** - * Specify the current version or the original version of the text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingVersion { - /** - * @remarks - * [Api set: WordApi 1.4] - */ - original = "Original", - /** - * @remarks - * [Api set: WordApi 1.4] - */ - current = "Current", - } - /** - * Specify the track state when ChangeTracking is on. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum ChangeTrackingState { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - added = "Added", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - deleted = "Deleted", - } - /** - * TrackedChange type. - * - * @remarks - * [Api set: WordApi 1.6] - */ - enum TrackedChangeType { - /** - * No revision. - * @remarks - * [Api set: WordApi 1.6] - */ - none = "None", - /** - * Add change. - * @remarks - * [Api set: WordApi 1.6] - */ - added = "Added", - /** - * Delete change. - * @remarks - * [Api set: WordApi 1.6] - */ - deleted = "Deleted", - /** - * Format change. - * @remarks - * [Api set: WordApi 1.6] - */ - formatted = "Formatted", - } - /** - * Note item type - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum NoteItemType { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - } - /** - * Provides information about the type of a raised event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventType { - /** - * ContentControlDeleted represents the event that the content control has been deleted. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDeleted = "ContentControlDeleted", - /** - * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlSelectionChanged = "ContentControlSelectionChanged", - /** - * ContentControlDataChanged represents the event that the data in the content control have been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDataChanged = "ContentControlDataChanged", - /** - * ContentControlAdded represents the event a content control has been added to the document. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlAdded = "ContentControlAdded", - /** - * Represents that a content control has been entered. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlEntered = "ContentControlEntered", - /** - * Represents that a content control has been exited. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlExited = "ContentControlExited", - /** - * Represents that one or more new paragraphs were added. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphAdded = "ParagraphAdded", - /** - * Represents that one or more paragraphs were changed. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphChanged = "ParagraphChanged", - /** - * Represents that one or more paragraphs were deleted. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphDeleted = "ParagraphDeleted", - /** - * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationClicked = "AnnotationClicked", - /** - * Represents that an annotation was hovered over in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationHovered = "AnnotationHovered", - /** - * Represents that one or more annotations were added in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationInserted = "AnnotationInserted", - /** - * Represents that one or more annotations were deleted from the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationRemoved = "AnnotationRemoved", - /** - * Represents an action in the annotation pop-up. - * @remarks - * [Api set: WordApi 1.8] - */ - annotationPopupAction = "AnnotationPopupAction", - } - /** - * An enum that specifies an event's source. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventSource { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - local = "Local", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - remote = "Remote", - } - /** - * Provides information about the content control that raised contentControlAdded event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlAddedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDataChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDataChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDeleted event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDeletedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlEntered event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlEnteredEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlExited event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlExitedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlSelectionChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlSelectionChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the paragraphs that raised the paragraphAdded event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphAddedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphChanged event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphChangedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphDeleted event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphDeletedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Specifies supported content control types and subtypes. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum ContentControlType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextInline = "RichTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextParagraphs = "RichTextParagraphs", - /** - * Contains a whole cell. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableCell = "RichTextTableCell", - /** - * Contains a whole row. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableRow = "RichTextTableRow", - /** - * Contains a whole table. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTable = "RichTextTable", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextInline = "PlainTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextParagraph = "PlainTextParagraph", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - picture = "Picture", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - buildingBlockGallery = "BuildingBlockGallery", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - checkBox = "CheckBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - comboBox = "ComboBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dropDownList = "DropDownList", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - datePicker = "DatePicker", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - repeatingSection = "RepeatingSection", - /** - * Identifies a rich text content control. - * @remarks - * [Api set: WordApi 1.1] - */ - richText = "RichText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainText = "PlainText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - group = "Group", - } - /** - * ContentControl appearance. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Content control appearance options are BoundingBox, Tags, or Hidden. - */ - enum ContentControlAppearance { - /** - * Represents a content control shown as a shaded rectangle or bounding box (with optional title). - * @remarks - * [Api set: WordApi 1.1] - */ - boundingBox = "BoundingBox", - /** - * Represents a content control shown as start and end markers. - * @remarks - * [Api set: WordApi 1.1] - */ - tags = "Tags", - /** - * Represents a content control that isn't shown. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - } - - /** - * The supported styles for underline format. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum UnderlineType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * No underline. - * @remarks - * [Api set: WordApi 1.1] - */ - none = "None", - /** - * Warning: hidden has been deprecated. - * @deprecated Hidden is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - /** - * Warning: dotLine has been deprecated. - * @deprecated DotLine is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - dotLine = "DotLine", - /** - * A single underline. This is the default value. - * @remarks - * [Api set: WordApi 1.1] - */ - single = "Single", - /** - * Only underline individual words. - * @remarks - * [Api set: WordApi 1.1] - */ - word = "Word", - /** - * A double underline. - * @remarks - * [Api set: WordApi 1.1] - */ - double = "Double", - /** - * A single thick underline. - * @remarks - * [Api set: WordApi 1.1] - */ - thick = "Thick", - /** - * A dotted underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dottedHeavy = "DottedHeavy", - /** - * A single dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dashLine = "DashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineHeavy = "DashLineHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLong = "DashLineLong", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLongHeavy = "DashLineLongHeavy", - /** - * An alternating dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLine = "DotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLineHeavy = "DotDashLineHeavy", - /** - * An alternating dot-dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLine = "TwoDotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLineHeavy = "TwoDotDashLineHeavy", - /** - * A single wavy underline. - * @remarks - * [Api set: WordApi 1.1] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveHeavy = "WaveHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveDouble = "WaveDouble", - } - /** - * Specifies the form of a break. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum BreakType { - /** - * Page break at the insertion point. - * @remarks - * [Api set: WordApi 1.1] - */ - page = "Page", - /** - * Warning: next has been deprecated. Use sectionNext instead. - * @deprecated Use sectionNext instead. - * @remarks - * [Api set: WordApi 1.1] - */ - next = "Next", - /** - * Section break on next page. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionNext = "SectionNext", - /** - * New section without a corresponding page break. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionContinuous = "SectionContinuous", - /** - * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionEven = "SectionEven", - /** - * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionOdd = "SectionOdd", - /** - * Line break. - * @remarks - * [Api set: WordApi 1.1] - */ - line = "Line", - } - /** - * The insertion location types. - * - * @remarks - * [Api set: WordApi 1.1] - * - * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. - * If the location is "Before" or "After", the new content will be outside of the modified object. - * If the location is "Start" or "End", the new content will be included as part of the modified object. - */ - enum InsertLocation { - /** - * Add content before the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - before = "Before", - /** - * Add content after the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - after = "After", - /** - * Prepend content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * Append content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - /** - * Replace the contents of the current object. - * @remarks - * [Api set: WordApi 1.1] - */ - replace = "Replace", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum Alignment { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * Unknown alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * Alignment to the left. - * @remarks - * [Api set: WordApi 1.1] - */ - left = "Left", - /** - * Alignment to the center. - * @remarks - * [Api set: WordApi 1.1] - */ - centered = "Centered", - /** - * Alignment to the right. - * @remarks - * [Api set: WordApi 1.1] - */ - right = "Right", - /** - * Fully justified alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - justified = "Justified", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum HeaderFooterType { - /** - * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. - * @remarks - * [Api set: WordApi 1.1] - */ - primary = "Primary", - /** - * Returns the header or footer on the first page of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - firstPage = "FirstPage", - /** - * Returns all headers or footers on even-numbered pages of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - evenPages = "EvenPages", - } - /** - * Represents the types of body objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum BodyType { - /** - * Unknown body type. - * @remarks - * [Api set: WordApi 1.3] - */ - unknown = "Unknown", - /** - * Main document body. - * @remarks - * [Api set: WordApi 1.3] - */ - mainDoc = "MainDoc", - /** - * Section body. - * @remarks - * [Api set: WordApi 1.3] - */ - section = "Section", - /** - * Header body. - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * Footer body. - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * Table cell body. - * @remarks - * [Api set: WordApi 1.3] - */ - tableCell = "TableCell", - /** - * Footnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * Endnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - /** - * Note body e.g., endnote, footnote. - * @remarks - * [Api set: WordApi 1.5] - */ - noteItem = "NoteItem", - } - /** - * This enum sets where the cursor (insertion point) in the document is after a selection. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SelectionMode { - /** - * The entire range is selected. - * @remarks - * [Api set: WordApi 1.1] - */ - select = "Select", - /** - * The cursor is at the beginning of the selection (just before the start of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * The cursor is at the end of the selection (just after the end of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImageFormat { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - unsupported = "Unsupported", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - undefined = "Undefined", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bmp = "Bmp", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - jpeg = "Jpeg", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gif = "Gif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tiff = "Tiff", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - png = "Png", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - icon = "Icon", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - exif = "Exif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - wmf = "Wmf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - emf = "Emf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pict = "Pict", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pdf = "Pdf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - svg = "Svg", - } - /** - * Represents the location of a range. You can get range by calling getRange on different objects such as {@link Word.Paragraph} and {@link Word.ContentControl}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum RangeLocation { - /** - * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. - * @remarks - * [Api set: WordApi 1.3] - */ - whole = "Whole", - /** - * The starting point of the object. For content control, it's the point after the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - start = "Start", - /** - * The ending point of the object. For paragraph, it's the point before the EOP (end of paragraph). For content control, it's the point before the closing tag. - * @remarks - * [Api set: WordApi 1.3] - */ - end = "End", - /** - * For content control only. It's the point before the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * The point after the object. If the object is a paragraph content control or table content control, it's the point after the EOP or Table characters. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - /** - * The range between 'Start' and 'End'. - * @remarks - * [Api set: WordApi 1.3] - */ - content = "Content", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum LocationRelation { - /** - * Indicates that this instance and the range are in different sub-documents. - * @remarks - * [Api set: WordApi 1.3] - */ - unrelated = "Unrelated", - /** - * Indicates that this instance and the range represent the same range. - * @remarks - * [Api set: WordApi 1.3] - */ - equal = "Equal", - /** - * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsStart = "ContainsStart", - /** - * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsEnd = "ContainsEnd", - /** - * Indicates that this instance contains the range, with the exception of the start and end character of this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - contains = "Contains", - /** - * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideStart = "InsideStart", - /** - * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideEnd = "InsideEnd", - /** - * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * Indicates that this instance occurs before, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentBefore = "AdjacentBefore", - /** - * Indicates that this instance starts before the range and overlaps the range's first character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsBefore = "OverlapsBefore", - /** - * Indicates that this instance occurs before the range. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * Indicates that this instance occurs after, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentAfter = "AdjacentAfter", - /** - * Indicates that this instance starts inside the range and overlaps the range’s last character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsAfter = "OverlapsAfter", - /** - * Indicates that this instance occurs after the range. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideHorizontal = "InsideHorizontal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideVertical = "InsideVertical", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - outside = "Outside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - all = "All", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum CellPaddingLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - } - /** - * Represents the width of a style's border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum BorderWidth { - /** - * None width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * 0.25 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt025 = "Pt025", - /** - * 0.50 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt050 = "Pt050", - /** - * 0.75 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt075 = "Pt075", - /** - * 1.00 point. This is the default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt100 = "Pt100", - /** - * 1.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt150 = "Pt150", - /** - * 2.25 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt225 = "Pt225", - /** - * 3.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt300 = "Pt300", - /** - * 4.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt450 = "Pt450", - /** - * 6.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt600 = "Pt600", - /** - * Mixed width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - mixed = "Mixed", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - single = "Single", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - double = "Double", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashed = "Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotDashed = "DotDashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dot2Dashed = "Dot2Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - triple = "Triple", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickSmall = "ThinThickSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinSmall = "ThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinSmall = "ThinThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickMed = "ThinThickMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinMed = "ThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinMed = "ThinThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickLarge = "ThinThickLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinLarge = "ThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinLarge = "ThinThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - doubleWave = "DoubleWave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashedSmall = "DashedSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashDotStroked = "DashDotStroked", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEmboss = "ThreeDEmboss", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEngrave = "ThreeDEngrave", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum VerticalAlignment { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - center = "Center", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListLevelType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - picture = "Picture", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListBullet { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - custom = "Custom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - solid = "Solid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hollow = "Hollow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - square = "Square", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - diamonds = "Diamonds", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arrow = "Arrow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - checkmark = "Checkmark", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListNumbering { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerLetter = "LowerLetter", - } - /** - * Represents the built-in style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - * - * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. - */ - enum BuiltInStyleName { - /** - * Mixed styles or other style not in this list. - * @remarks - * [Api set: WordApi 1.3] - */ - other = "Other", - /** - * Reset character and paragraph style to default. - * @remarks - * [Api set: WordApi 1.3] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading1 = "Heading1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading2 = "Heading2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading3 = "Heading3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading4 = "Heading4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading5 = "Heading5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading6 = "Heading6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading7 = "Heading7", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading8 = "Heading8", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading9 = "Heading9", - /** - * Table-of-content level 1. - * @remarks - * [Api set: WordApi 1.3] - */ - toc1 = "Toc1", - /** - * Table-of-content level 2. - * @remarks - * [Api set: WordApi 1.3] - */ - toc2 = "Toc2", - /** - * Table-of-content level 3. - * @remarks - * [Api set: WordApi 1.3] - */ - toc3 = "Toc3", - /** - * Table-of-content level 4. - * @remarks - * [Api set: WordApi 1.3] - */ - toc4 = "Toc4", - /** - * Table-of-content level 5. - * @remarks - * [Api set: WordApi 1.3] - */ - toc5 = "Toc5", - /** - * Table-of-content level 6. - * @remarks - * [Api set: WordApi 1.3] - */ - toc6 = "Toc6", - /** - * Table-of-content level 7. - * @remarks - * [Api set: WordApi 1.3] - */ - toc7 = "Toc7", - /** - * Table-of-content level 8. - * @remarks - * [Api set: WordApi 1.3] - */ - toc8 = "Toc8", - /** - * Table-of-content level 9. - * @remarks - * [Api set: WordApi 1.3] - */ - toc9 = "Toc9", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteText = "FootnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - caption = "Caption", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteReference = "FootnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteReference = "EndnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteText = "EndnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - title = "Title", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtitle = "Subtitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink = "Hyperlink", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - strong = "Strong", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - emphasis = "Emphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - noSpacing = "NoSpacing", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listParagraph = "ListParagraph", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - quote = "Quote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseQuote = "IntenseQuote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleEmphasis = "SubtleEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseEmphasis = "IntenseEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleReference = "SubtleReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseReference = "IntenseReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bookTitle = "BookTitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bibliography = "Bibliography", - /** - * Table-of-content heading. - * @remarks - * [Api set: WordApi 1.3] - */ - tocHeading = "TocHeading", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGrid = "TableGrid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable1 = "PlainTable1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable2 = "PlainTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable3 = "PlainTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable4 = "PlainTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable5 = "PlainTable5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGridLight = "TableGridLight", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light = "GridTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent1 = "GridTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent2 = "GridTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent3 = "GridTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent4 = "GridTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent5 = "GridTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent6 = "GridTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2 = "GridTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent1 = "GridTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent2 = "GridTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent3 = "GridTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent4 = "GridTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent5 = "GridTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent6 = "GridTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3 = "GridTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent1 = "GridTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent2 = "GridTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent3 = "GridTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent4 = "GridTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent5 = "GridTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent6 = "GridTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4 = "GridTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent1 = "GridTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent2 = "GridTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent3 = "GridTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent4 = "GridTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent5 = "GridTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent6 = "GridTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark = "GridTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful = "GridTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful = "GridTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light = "ListTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent1 = "ListTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent2 = "ListTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent3 = "ListTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent4 = "ListTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent5 = "ListTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent6 = "ListTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2 = "ListTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent1 = "ListTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent2 = "ListTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent3 = "ListTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent4 = "ListTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent5 = "ListTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent6 = "ListTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3 = "ListTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent1 = "ListTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent2 = "ListTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent3 = "ListTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent4 = "ListTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent5 = "ListTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent6 = "ListTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4 = "ListTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent1 = "ListTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent2 = "ListTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent3 = "ListTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent4 = "ListTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent5 = "ListTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent6 = "ListTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark = "ListTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent1 = "ListTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent2 = "ListTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent3 = "ListTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent4 = "ListTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent5 = "ListTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent6 = "ListTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful = "ListTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful = "ListTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum DocumentPropertyType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - string = "String", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - date = "Date", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - boolean = "Boolean", - } - /** - * Represents the type of style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum StyleType { - /** - * Represents that the style is a character style. - * @remarks - * [Api set: WordApi 1.5] - */ - character = "Character", - /** - * Represents that the style is a list style. Currently supported on desktop. - * @remarks - * [Api set: WordApi 1.5] - */ - list = "List", - /** - * Represents that the style is a paragraph style. - * @remarks - * [Api set: WordApi 1.5] - */ - paragraph = "Paragraph", - /** - * Represents that the style is a table style. - * @remarks - * [Api set: WordApi 1.5] - */ - table = "Table", - } - /** - * Represents the outline levels. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum OutlineLevel { - /** - * Represents outline level 1. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel1 = "OutlineLevel1", - /** - * Represents outline level 2. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel2 = "OutlineLevel2", - /** - * Represents outline level 3. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel3 = "OutlineLevel3", - /** - * Represents outline level 4. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel4 = "OutlineLevel4", - /** - * Represents outline level 5. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel5 = "OutlineLevel5", - /** - * Represents outline level 6. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel6 = "OutlineLevel6", - /** - * Represents outline level 7. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel7 = "OutlineLevel7", - /** - * Represents outline level 8. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel8 = "OutlineLevel8", - /** - * Represents outline level 9. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel9 = "OutlineLevel9", - /** - * Represents outline level body text, not an outline level. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevelBodyText = "OutlineLevelBodyText", - } - /** - * Specifies the close behavior for `Document.close`. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum CloseBehavior { - /** - * Saves the changes before closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - save = "Save", - /** - * Discard the possible changes when closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - skipSave = "SkipSave", - } - /** - * Specifies the save behavior for `Document.save`. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SaveBehavior { - /** - * Saves the document without prompting the user. If it's a new document, - it will be saved with the default name or specified name in the default location. - * @remarks - * [Api set: WordApi 1.1] - */ - save = "Save", - /** - * Displays the "Save As" dialog to the user if the document hasn't been saved. - Won't take effect if the document was previously saved. - * @remarks - * [Api set: WordApi 1.1] - */ - prompt = "Prompt", - } - /** - * Represents the type of Field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldType { - /** - * Represents that the field type is Add-in. - * @remarks - * [Api set: WordApi 1.5] - */ - addin = "Addin", - /** - * Represents that the field type is AddressBlock. - * @remarks - * [Api set: WordApi 1.5] - */ - addressBlock = "AddressBlock", - /** - * Represents that the field type is Advance. - * @remarks - * [Api set: WordApi 1.5] - */ - advance = "Advance", - /** - * Represents that the field type is Ask. - * @remarks - * [Api set: WordApi 1.5] - */ - ask = "Ask", - /** - * Represents that the field type is Author. - * @remarks - * [Api set: WordApi 1.5] - */ - author = "Author", - /** - * Represents that the field type is AutoText. - * @remarks - * [Api set: WordApi 1.5] - */ - autoText = "AutoText", - /** - * Represents that the field type is AutoTextList. - * @remarks - * [Api set: WordApi 1.5] - */ - autoTextList = "AutoTextList", - /** - * Represents that the field type is Barcode. - * @remarks - * [Api set: WordApi 1.5] - */ - barCode = "BarCode", - /** - * Represents that the field type is Bibliography. - * @remarks - * [Api set: WordApi 1.5] - */ - bibliography = "Bibliography", - /** - * Represents that the field type is BidiOutline. - * @remarks - * [Api set: WordApi 1.5] - */ - bidiOutline = "BidiOutline", - /** - * Represents that the field type is Citation. - * @remarks - * [Api set: WordApi 1.5] - */ - citation = "Citation", - /** - * Represents that the field type is Comments. - * @remarks - * [Api set: WordApi 1.5] - */ - comments = "Comments", - /** - * Represents that the field type is Compare. - * @remarks - * [Api set: WordApi 1.5] - */ - compare = "Compare", - /** - * Represents that the field type is CreateDate. - * @remarks - * [Api set: WordApi 1.5] - */ - createDate = "CreateDate", - /** - * Represents that the field type is Data. - * @remarks - * [Api set: WordApi 1.5] - */ - data = "Data", - /** - * Represents that the field type is Database. - * @remarks - * [Api set: WordApi 1.5] - */ - database = "Database", - /** - * Represents that the field type is Date. - * @remarks - * [Api set: WordApi 1.5] - */ - date = "Date", - /** - * Represents that the field type is DisplayBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - displayBarcode = "DisplayBarcode", - /** - * Represents that the field type is DocumentProperty - * @remarks - * [Api set: WordApi 1.5] - */ - docProperty = "DocProperty", - /** - * Represents that the field type is DocumentVariable. - * @remarks - * [Api set: WordApi 1.5] - */ - docVariable = "DocVariable", - /** - * Represents that the field type is EditTime. - * @remarks - * [Api set: WordApi 1.5] - */ - editTime = "EditTime", - /** - * Represents that the field type is Embedded. - * @remarks - * [Api set: WordApi 1.5] - */ - embedded = "Embedded", - /** - * Represents that the field type is Equation. - * @remarks - * [Api set: WordApi 1.5] - */ - eq = "EQ", - /** - * Represents that the field type is Expression. - * @remarks - * [Api set: WordApi 1.5] - */ - expression = "Expression", - /** - * Represents that the field type is FileName. - * @remarks - * [Api set: WordApi 1.5] - */ - fileName = "FileName", - /** - * Represents that the field type is FileSize. - * @remarks - * [Api set: WordApi 1.5] - */ - fileSize = "FileSize", - /** - * Represents that the field type is FillIn. - * @remarks - * [Api set: WordApi 1.5] - */ - fillIn = "FillIn", - /** - * Represents that the field type is FormCheckbox. - * @remarks - * [Api set: WordApi 1.5] - */ - formCheckbox = "FormCheckbox", - /** - * Represents that the field type is FormDropdown. - * @remarks - * [Api set: WordApi 1.5] - */ - formDropdown = "FormDropdown", - /** - * Represents that the field type is FormText. - * @remarks - * [Api set: WordApi 1.5] - */ - formText = "FormText", - /** - * Represents that the field type is GotoButton. - * @remarks - * [Api set: WordApi 1.5] - */ - gotoButton = "GotoButton", - /** - * Represents that the field type is GreetingLine. - * @remarks - * [Api set: WordApi 1.5] - */ - greetingLine = "GreetingLine", - /** - * Represents that the field type is Hyperlink. - * @remarks - * [Api set: WordApi 1.5] - */ - hyperlink = "Hyperlink", - /** - * Represents that the field type is If. - * @remarks - * [Api set: WordApi 1.5] - */ - if = "If", - /** - * Represents that the field type is Import. - * @remarks - * [Api set: WordApi 1.5] - */ - import = "Import", - /** - * Represents that the field type is Include. - * @remarks - * [Api set: WordApi 1.5] - */ - include = "Include", - /** - * Represents that the field type is IncludePicture. - * @remarks - * [Api set: WordApi 1.5] - */ - includePicture = "IncludePicture", - /** - * Represents that the field type is IncludeText. - * @remarks - * [Api set: WordApi 1.5] - */ - includeText = "IncludeText", - /** - * Represents that the field type is Index. - * @remarks - * [Api set: WordApi 1.5] - */ - index = "Index", - /** - * Represents that the field type is Information. - * @remarks - * [Api set: WordApi 1.5] - */ - info = "Info", - /** - * Represents that the field type is Keywords. - * @remarks - * [Api set: WordApi 1.5] - */ - keywords = "Keywords", - /** - * Represents that the field type is LastSavedBy. - * @remarks - * [Api set: WordApi 1.5] - */ - lastSavedBy = "LastSavedBy", - /** - * Represents that the field type is Link. - * @remarks - * [Api set: WordApi 1.5] - */ - link = "Link", - /** - * Represents that the field type is ListNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - listNum = "ListNum", - /** - * Represents that the field type is MacroButton. - * @remarks - * [Api set: WordApi 1.5] - */ - macroButton = "MacroButton", - /** - * Represents that the field type is MergeBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeBarcode = "MergeBarcode", - /** - * Represents that the field type is MergeField. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeField = "MergeField", - /** - * Represents that the field type is MergeRecord. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeRec = "MergeRec", - /** - * Represents that the field type is MergeSequence. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeSeq = "MergeSeq", - /** - * Represents that the field type is Next. - * @remarks - * [Api set: WordApi 1.5] - */ - next = "Next", - /** - * Represents that the field type is NextIf. - * @remarks - * [Api set: WordApi 1.5] - */ - nextIf = "NextIf", - /** - * Represents that the field type is NoteReference. - * @remarks - * [Api set: WordApi 1.5] - */ - noteRef = "NoteRef", - /** - * Represents that the field type is NumberOfCharacters. - * @remarks - * [Api set: WordApi 1.5] - */ - numChars = "NumChars", - /** - * Represents that the field type is NumberOfPages. - * @remarks - * [Api set: WordApi 1.5] - */ - numPages = "NumPages", - /** - * Represents that the field type is NumberOfWords. - * @remarks - * [Api set: WordApi 1.5] - */ - numWords = "NumWords", - /** - * Represents that the field type is ActiveXControl. - * @remarks - * [Api set: WordApi 1.5] - */ - ocx = "OCX", - /** - * Represents that the field type is Page. - * @remarks - * [Api set: WordApi 1.5] - */ - page = "Page", - /** - * Represents that the field type is PageReference. - * @remarks - * [Api set: WordApi 1.5] - */ - pageRef = "PageRef", - /** - * Represents that the field type is Print. - * @remarks - * [Api set: WordApi 1.5] - */ - print = "Print", - /** - * Represents that the field type is PrintDate. - * @remarks - * [Api set: WordApi 1.5] - */ - printDate = "PrintDate", - /** - * Represents that the field type is Private. - * @remarks - * [Api set: WordApi 1.5] - */ - private = "Private", - /** - * Represents that the field type is Quote. - * @remarks - * [Api set: WordApi 1.5] - */ - quote = "Quote", - /** - * Represents that the field type is ReferencedDocument. - * @remarks - * [Api set: WordApi 1.5] - */ - rd = "RD", - /** - * Represents that the field type is Reference. - * @remarks - * [Api set: WordApi 1.5] - */ - ref = "Ref", - /** - * Represents that the field type is RevisionNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - revNum = "RevNum", - /** - * Represents that the field type is SaveDate. - * @remarks - * [Api set: WordApi 1.5] - */ - saveDate = "SaveDate", - /** - * Represents that the field type is Section. - * @remarks - * [Api set: WordApi 1.5] - */ - section = "Section", - /** - * Represents that the field type is SectionPages. - * @remarks - * [Api set: WordApi 1.5] - */ - sectionPages = "SectionPages", - /** - * Represents that the field type is Sequence. - * @remarks - * [Api set: WordApi 1.5] - */ - seq = "Seq", - /** - * Represents that the field type is Set. - * @remarks - * [Api set: WordApi 1.5] - */ - set = "Set", - /** - * Represents that the field type is Shape. - * @remarks - * [Api set: WordApi 1.5] - */ - shape = "Shape", - /** - * Represents that the field type is SkipIf. - * @remarks - * [Api set: WordApi 1.5] - */ - skipIf = "SkipIf", - /** - * Represents that the field type is StyleReference. - * @remarks - * [Api set: WordApi 1.5] - */ - styleRef = "StyleRef", - /** - * Represents that the field type is Subject. - * @remarks - * [Api set: WordApi 1.5] - */ - subject = "Subject", - /** - * Represents that the field type is Subscriber. - * @remarks - * [Api set: WordApi 1.5] - */ - subscriber = "Subscriber", - /** - * Represents that the field type is Symbol. - * @remarks - * [Api set: WordApi 1.5] - */ - symbol = "Symbol", - /** - * Represents that the field type is TableOfAuthoritiesEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - ta = "TA", - /** - * Represents that the field type is TableOfContentsEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - tc = "TC", - /** - * Represents that the field type is Template. - * @remarks - * [Api set: WordApi 1.5] - */ - template = "Template", - /** - * Represents that the field type is Time. - * @remarks - * [Api set: WordApi 1.5] - */ - time = "Time", - /** - * Represents that the field type is Title. - * @remarks - * [Api set: WordApi 1.5] - */ - title = "Title", - /** - * Represents that the field type is TableOfAuthorities. - * @remarks - * [Api set: WordApi 1.5] - */ - toa = "TOA", - /** - * Represents that the field type is TableOfContents. - * @remarks - * [Api set: WordApi 1.5] - */ - toc = "TOC", - /** - * Represents that the field type is UserAddress. - * @remarks - * [Api set: WordApi 1.5] - */ - userAddress = "UserAddress", - /** - * Represents that the field type is UserInitials. - * @remarks - * [Api set: WordApi 1.5] - */ - userInitials = "UserInitials", - /** - * Represents that the field type is UserName. - * @remarks - * [Api set: WordApi 1.5] - */ - userName = "UserName", - /** - * Represents that the field type is IndexEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - xe = "XE", - /** - * Represents that the field type is Empty. - * @remarks - * [Api set: WordApi 1.5] - */ - empty = "Empty", - /** - * Represents the field types not supported by the Office JavaScript API. - * @remarks - * [Api set: WordApi 1.5] - */ - others = "Others", - /** - * Represents that the field type is Undefined. - * @remarks - * [Api set: WordApi 1.5] - */ - undefined = "Undefined", - } - /** - * Represents the kind of field. Indicates how the field works in relation to updating. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldKind { - /** - * Represents that the field is invalid. For example, a pair of field characters with nothing inside. - * @remarks - * [Api set: WordApi 1.5] - */ - none = "None", - /** - * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - hot = "Hot", - /** - * Represents that the field is automatically updated when the source changes or the field can be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - warm = "Warm", - /** - * Represents that the field doesn't have a result. - * @remarks - * [Api set: WordApi 1.5] - */ - cold = "Cold", - } - /** - * Represents the character inserted after the list item mark. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum TrailingCharacter { - /** - * A tab is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingTab = "TrailingTab", - /** - * A space is inserted. Default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingSpace = "TrailingSpace", - /** - * No character is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingNone = "TrailingNone", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ListBuiltInNumberStyle { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerLetter = "LowerLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinal = "Ordinal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - cardinalText = "CardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinalText = "OrdinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanji = "Kanji", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiDigit = "KanjiDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueoHalfWidth = "AiueoHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - irohaHalfWidth = "IrohaHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicFullWidth = "ArabicFullWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional = "KanjiTraditional", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional2 = "KanjiTraditional2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberInCircle = "NumberInCircle", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueo = "Aiueo", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - iroha = "Iroha", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ = "ArabicLZ", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ganada = "Ganada", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - chosung = "Chosung", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum1 = "GBNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum2 = "GBNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum3 = "GBNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum4 = "GBNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac1 = "Zodiac1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac2 = "Zodiac2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac3 = "Zodiac3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum1 = "TradChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum2 = "TradChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum3 = "TradChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum4 = "TradChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum1 = "SimpChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum2 = "SimpChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum3 = "SimpChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum4 = "SimpChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaRead = "HanjaRead", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaReadDigit = "HanjaReadDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hangul = "Hangul", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanja = "Hanja", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew1 = "Hebrew1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic1 = "Arabic1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew2 = "Hebrew2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic2 = "Arabic2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter1 = "HindiLetter1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter2 = "HindiLetter2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiArabic = "HindiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiCardinalText = "HindiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiLetter = "ThaiLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiArabic = "ThaiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiCardinalText = "ThaiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - vietCardinalText = "VietCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseRussian = "LowercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseRussian = "UppercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseGreek = "LowercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseGreek = "UppercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ2 = "ArabicLZ2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ3 = "ArabicLZ3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ4 = "ArabicLZ4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseTurkish = "LowercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseTurkish = "UppercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseBulgarian = "LowercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseBulgarian = "UppercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pictureBullet = "PictureBullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legal = "Legal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legalLZ = "LegalLZ", - } - /** - * Represents the shading texture. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ShadingTextureType { - /** - * Represents dark diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalDown = "DarkDiagonalDown", - /** - * Represents dark diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalUp = "DarkDiagonalUp", - /** - * Represents dark horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkGrid = "DarkGrid", - /** - * Represents dark horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkHorizontal = "DarkHorizontal", - /** - * Represents dark diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkTrellis = "DarkTrellis", - /** - * Represents dark vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkVertical = "DarkVertical", - /** - * Represents light diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalDown = "LightDiagonalDown", - /** - * Represents light diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalUp = "LightDiagonalUp", - /** - * Represents light horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightGrid = "LightGrid", - /** - * Represents light horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightHorizontal = "LightHorizontal", - /** - * Represents light diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightTrellis = "LightTrellis", - /** - * Represents light vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightVertical = "LightVertical", - /** - * Represents that there's no texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * Represents 10 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent10 = "Percent10", - /** - * Represents 12.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent12Pt5 = "Percent12Pt5", - /** - * Represents 15 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent15 = "Percent15", - /** - * Represents 20 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent20 = "Percent20", - /** - * Represents 25 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent25 = "Percent25", - /** - * Represents 30 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent30 = "Percent30", - /** - * Represents 35 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent35 = "Percent35", - /** - * Represents 37.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent37Pt5 = "Percent37Pt5", - /** - * Represents 40 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent40 = "Percent40", - /** - * Represents 45 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent45 = "Percent45", - /** - * Represents 5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent5 = "Percent5", - /** - * Represents 50 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent50 = "Percent50", - /** - * Represents 55 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent55 = "Percent55", - /** - * Represents 60 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent60 = "Percent60", - /** - * Represents 62.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent62Pt5 = "Percent62Pt5", - /** - * Represents 65 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent65 = "Percent65", - /** - * Represents 70 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent70 = "Percent70", - /** - * Represents 75 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent75 = "Percent75", - /** - * Represents 80 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent80 = "Percent80", - /** - * Represents 85 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent85 = "Percent85", - /** - * Represents 87.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent87Pt5 = "Percent87Pt5", - /** - * Represents 90 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent90 = "Percent90", - /** - * Represents 95 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent95 = "Percent95", - /** - * Represents solid texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - solid = "Solid", - } - /** - * Specifies the target document for displaying document comparison differences. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum CompareTarget { - /** - * Places comparison differences in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetCurrent = "CompareTargetCurrent", - /** - * Places comparison differences in the target document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetSelected = "CompareTargetSelected", - /** - * Places comparison differences in a new document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetNew = "CompareTargetNew", - } - /** - * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImportedStylesConflictBehavior { - /** - * Ignore conflicting imported styles and keep the existing version of those styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignore = "Ignore", - /** - * Overwrite the existing styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - overwrite = "Overwrite", - /** - * 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. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - createNew = "CreateNew", - } - /** - * Represents the shape type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeType { - /** - * Unsupported shape type. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - unsupported = "Unsupported", - /** - * Text box shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textBox = "TextBox", - /** - * Geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShape = "GeometricShape", - /** - * Group shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group = "Group", - /** - * Picture shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Canvas shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas = "Canvas", - } - /** - * Represents what the horizontal position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeHorizontalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to column. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - column = "Column", - /** - * Relative to character. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - character = "Character", - /** - * Relative to left margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin = "LeftMargin", - /** - * Relative to right margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin = "RightMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the vertical position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeVerticalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to paragraph. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - paragraph = "Paragraph", - /** - * Relative to line. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - line = "Line", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the horizontal or vertical size of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeSize { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Specifies the shape type for a `GeometricShape` object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum GeometricShapeType { - /** - * Line inverse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lineInverse = "LineInverse", - /** - * Triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - triangle = "Triangle", - /** - * Right triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightTriangle = "RightTriangle", - /** - * Rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rectangle = "Rectangle", - /** - * Diamond geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diamond = "Diamond", - /** - * Parallelogram geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parallelogram = "Parallelogram", - /** - * Trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - trapezoid = "Trapezoid", - /** - * Non-isosceles trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", - /** - * Pentagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pentagon = "Pentagon", - /** - * Hexagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hexagon = "Hexagon", - /** - * Heptagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heptagon = "Heptagon", - /** - * Octagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - octagon = "Octagon", - /** - * Decagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - decagon = "Decagon", - /** - * Dodecagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - dodecagon = "Dodecagon", - /** - * Star 4-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star4 = "Star4", - /** - * Star 5-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star5 = "Star5", - /** - * Star 6-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star6 = "Star6", - /** - * Star 7-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star7 = "Star7", - /** - * Star 8-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star8 = "Star8", - /** - * Star 10-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star10 = "Star10", - /** - * Star 12-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star12 = "Star12", - /** - * Star 16-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star16 = "Star16", - /** - * Star 24-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star24 = "Star24", - /** - * Star 32-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star32 = "Star32", - /** - * Round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - roundRectangle = "RoundRectangle", - /** - * Round one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round1Rectangle = "Round1Rectangle", - /** - * Round two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2SameRectangle = "Round2SameRectangle", - /** - * Round two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2DiagonalRectangle = "Round2DiagonalRectangle", - /** - * Snip round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snipRoundRectangle = "SnipRoundRectangle", - /** - * Snip one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip1Rectangle = "Snip1Rectangle", - /** - * Snip two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2SameRectangle = "Snip2SameRectangle", - /** - * Snip two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2DiagonalRectangle = "Snip2DiagonalRectangle", - /** - * Plaque geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaque = "Plaque", - /** - * Ellipse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipse = "Ellipse", - /** - * Teardrop geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - teardrop = "Teardrop", - /** - * Home plate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - homePlate = "HomePlate", - /** - * Chevron geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chevron = "Chevron", - /** - * Pie wedge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pieWedge = "PieWedge", - /** - * Pie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pie = "Pie", - /** - * Block arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - blockArc = "BlockArc", - /** - * Donut geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - donut = "Donut", - /** - * No smoking geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noSmoking = "NoSmoking", - /** - * Right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrow = "RightArrow", - /** - * Left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrow = "LeftArrow", - /** - * Up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrow = "UpArrow", - /** - * Down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrow = "DownArrow", - /** - * Striped right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - stripedRightArrow = "StripedRightArrow", - /** - * Notched right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - notchedRightArrow = "NotchedRightArrow", - /** - * Bent up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentUpArrow = "BentUpArrow", - /** - * Left-right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrow = "LeftRightArrow", - /** - * Up-down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrow = "UpDownArrow", - /** - * Left-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftUpArrow = "LeftUpArrow", - /** - * Left-right-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightUpArrow = "LeftRightUpArrow", - /** - * Quad arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrow = "QuadArrow", - /** - * Left arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrowCallout = "LeftArrowCallout", - /** - * Right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrowCallout = "RightArrowCallout", - /** - * Up arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrowCallout = "UpArrowCallout", - /** - * Down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrowCallout = "DownArrowCallout", - /** - * Left-right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrowCallout = "LeftRightArrowCallout", - /** - * Up-down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrowCallout = "UpDownArrowCallout", - /** - * Quad arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrowCallout = "QuadArrowCallout", - /** - * Bent arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentArrow = "BentArrow", - /** - * U-turn arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - uturnArrow = "UturnArrow", - /** - * Circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - circularArrow = "CircularArrow", - /** - * Left circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftCircularArrow = "LeftCircularArrow", - /** - * Left-right circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightCircularArrow = "LeftRightCircularArrow", - /** - * Curved right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedRightArrow = "CurvedRightArrow", - /** - * Curved left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedLeftArrow = "CurvedLeftArrow", - /** - * Curved up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedUpArrow = "CurvedUpArrow", - /** - * Curved down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedDownArrow = "CurvedDownArrow", - /** - * Swoosh arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - swooshArrow = "SwooshArrow", - /** - * Cube geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cube = "Cube", - /** - * Can geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - can = "Can", - /** - * Lightning bolt geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lightningBolt = "LightningBolt", - /** - * Heart geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heart = "Heart", - /** - * Sun geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - sun = "Sun", - /** - * Moon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - moon = "Moon", - /** - * Smiley face geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - smileyFace = "SmileyFace", - /** - * Irregular seal 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal1 = "IrregularSeal1", - /** - * Irregular seal 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal2 = "IrregularSeal2", - /** - * Folded corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foldedCorner = "FoldedCorner", - /** - * Bevel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bevel = "Bevel", - /** - * Frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - frame = "Frame", - /** - * Half frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - halfFrame = "HalfFrame", - /** - * Corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - corner = "Corner", - /** - * Diagonal stripe geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diagonalStripe = "DiagonalStripe", - /** - * Chord geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chord = "Chord", - /** - * Arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - arc = "Arc", - /** - * Left bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBracket = "LeftBracket", - /** - * Right bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBracket = "RightBracket", - /** - * Left brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBrace = "LeftBrace", - /** - * Right brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBrace = "RightBrace", - /** - * Bracket pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracketPair = "BracketPair", - /** - * Brace pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracePair = "BracePair", - /** - * Callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout1 = "Callout1", - /** - * Callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout2 = "Callout2", - /** - * Callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout3 = "Callout3", - /** - * Accent callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout1 = "AccentCallout1", - /** - * Accent callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout2 = "AccentCallout2", - /** - * Accent callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout3 = "AccentCallout3", - /** - * Border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout1 = "BorderCallout1", - /** - * Border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout2 = "BorderCallout2", - /** - * Border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout3 = "BorderCallout3", - /** - * Accent border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout1 = "AccentBorderCallout1", - /** - * Accent border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout2 = "AccentBorderCallout2", - /** - * Accent border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout3 = "AccentBorderCallout3", - /** - * Wedge rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRectCallout = "WedgeRectCallout", - /** - * Wedge rounded rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRRectCallout = "WedgeRRectCallout", - /** - * Wedge ellipse callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeEllipseCallout = "WedgeEllipseCallout", - /** - * Cloud callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloudCallout = "CloudCallout", - /** - * Cloud geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloud = "Cloud", - /** - * Ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon = "Ribbon", - /** - * Ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon2 = "Ribbon2", - /** - * Ellipse ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon = "EllipseRibbon", - /** - * Ellipse ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon2 = "EllipseRibbon2", - /** - * Left-right ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightRibbon = "LeftRightRibbon", - /** - * Vertical scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalScroll = "VerticalScroll", - /** - * Horizontal scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontalScroll = "HorizontalScroll", - /** - * Wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wave = "Wave", - /** - * Double wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - doubleWave = "DoubleWave", - /** - * Plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plus = "Plus", - /** - * Flow chart process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartProcess = "FlowChartProcess", - /** - * Flow chart decision geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDecision = "FlowChartDecision", - /** - * Flow chart input-output geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInputOutput = "FlowChartInputOutput", - /** - * Flow chart predefined process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPredefinedProcess = "FlowChartPredefinedProcess", - /** - * Flow chart internal storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInternalStorage = "FlowChartInternalStorage", - /** - * Flow chart document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDocument = "FlowChartDocument", - /** - * Flow chart multidocument geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMultidocument = "FlowChartMultidocument", - /** - * Flow chart terminator geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartTerminator = "FlowChartTerminator", - /** - * Flow chart preparation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPreparation = "FlowChartPreparation", - /** - * Flow chart manual input geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualInput = "FlowChartManualInput", - /** - * Flow chart manual operation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualOperation = "FlowChartManualOperation", - /** - * Flow chart connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartConnector = "FlowChartConnector", - /** - * Flow chart punched card geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedCard = "FlowChartPunchedCard", - /** - * Flow chart punched tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedTape = "FlowChartPunchedTape", - /** - * Flow chart summing junction geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSummingJunction = "FlowChartSummingJunction", - /** - * Flow chart OR geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOr = "FlowChartOr", - /** - * Flow chart collate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartCollate = "FlowChartCollate", - /** - * Flow chart sort geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSort = "FlowChartSort", - /** - * Flow chart extract geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartExtract = "FlowChartExtract", - /** - * Flow chart merge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMerge = "FlowChartMerge", - /** - * Flow chart offline storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOfflineStorage = "FlowChartOfflineStorage", - /** - * Flow chart online storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOnlineStorage = "FlowChartOnlineStorage", - /** - * Flow chart magnetic tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticTape = "FlowChartMagneticTape", - /** - * Flow chart magnetic disk geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDisk = "FlowChartMagneticDisk", - /** - * Flow chart magnetic drum geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDrum = "FlowChartMagneticDrum", - /** - * Flow chart display geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDisplay = "FlowChartDisplay", - /** - * Flow chart delay geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDelay = "FlowChartDelay", - /** - * Flow chart alternate process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartAlternateProcess = "FlowChartAlternateProcess", - /** - * Flow chart off-page connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOffpageConnector = "FlowChartOffpageConnector", - /** - * Action button blank geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBlank = "ActionButtonBlank", - /** - * Action button home geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHome = "ActionButtonHome", - /** - * Action button help geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHelp = "ActionButtonHelp", - /** - * Action button information geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonInformation = "ActionButtonInformation", - /** - * Action button forward next geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonForwardNext = "ActionButtonForwardNext", - /** - * Action button back previous geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBackPrevious = "ActionButtonBackPrevious", - /** - * Action button end geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonEnd = "ActionButtonEnd", - /** - * Action button beginning geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBeginning = "ActionButtonBeginning", - /** - * Action button return geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonReturn = "ActionButtonReturn", - /** - * Action button document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonDocument = "ActionButtonDocument", - /** - * Action button sound geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonSound = "ActionButtonSound", - /** - * Action button movie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonMovie = "ActionButtonMovie", - /** - * Gear 6 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear6 = "Gear6", - /** - * Gear 9 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear9 = "Gear9", - /** - * Funnel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - funnel = "Funnel", - /** - * Math plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathPlus = "MathPlus", - /** - * Math minus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMinus = "MathMinus", - /** - * Math multiply geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMultiply = "MathMultiply", - /** - * Math divide geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathDivide = "MathDivide", - /** - * Math equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathEqual = "MathEqual", - /** - * Math not equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathNotEqual = "MathNotEqual", - /** - * Corner tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cornerTabs = "CornerTabs", - /** - * Square tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - squareTabs = "SquareTabs", - /** - * Plaque tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaqueTabs = "PlaqueTabs", - /** - * Chart X geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartX = "ChartX", - /** - * Chart star geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartStar = "ChartStar", - /** - * Chart plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartPlus = "ChartPlus", - } - /** - * Specifies a shape's fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeFillType { - /** - * No fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noFill = "NoFill", - /** - * Solid fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - solid = "Solid", - /** - * Gradient fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gradient = "Gradient", - /** - * Pattern fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pattern = "Pattern", - /** - * Picture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Texture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - texture = "Texture", - /** - * Mixed fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies the vertical alignment for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextVerticalAlignment { - /** - * Anchor the text at the top of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top = "Top", - /** - * Anchor the text at the middle of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - middle = "Middle", - /** - * Anchor the text at the bottom of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottom = "Bottom", - } - /** - * Specifies the orientation for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextOrientation { - /** - * No orientation, such as in a new geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Horizontal text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontal = "Horizontal", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianVertical = "EastAsianVertical", - /** - * Determines if all of the text is vertical orientation (each line is 270 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical270 = "Vertical270", - /** - * Determines if all of the text is vertical orientation (each line is 90 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical = "Vertical", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianHorizontalRotated = "EastAsianHorizontalRotated", - /** - * A combination of automatic orientation is used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Determines the type of automatic sizing allowed. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeAutoSize { - /** - * No autosizing. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * The text is adjusted to fit the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textToFitShape = "TextToFitShape", - /** - * The shape is adjusted to fit the text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeToFitText = "ShapeToFitText", - /** - * A combination of automatic sizing schemes are used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies how to wrap document text around a shape. For more details, see the "Text Wrapping" tab of {@link https://support.microsoft.com/office/a0f53857-b501-46c6-ba8b-68ba51e0e3cc | Layout options}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapType { - /** - * Places the shape in line with text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - inline = "Inline", - /** - * Wraps text squarely around the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - square = "Square", - /** - * Wraps text close to the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - tight = "Tight", - /** - * Wraps text around and through the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - through = "Through", - /** - * Places text above and below the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topBottom = "TopBottom", - /** - * Places shape behind text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - behind = "Behind", - /** - * Places shape in front of text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - front = "Front", - } - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farther from the respective page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapSide { - /** - * Has no wrap side property, such as those for inline shapes. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Both left and right sides of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - both = "Both", - /** - * Left side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left = "Left", - /** - * Right side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - right = "Right", - /** - * Side of the shape that's farther from the respective page margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - largest = "Largest", - } - /** - * Specifies the scale size type of a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleType { - /** - * Scale from current size of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - currentSize = "CurrentSize", - /** - * Scale from original size of the shape. It only works for pictures. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - originalSize = "OriginalSize", - } - /** - * Specifies which part of the shape retains its position when the shape is scaled. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleFrom { - /** - * Scale from the top left corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromTopLeft = "ScaleFromTopLeft", - /** - * Scale from the center of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromMiddle = "ScaleFromMiddle", - /** - * Scale from the bottom right corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromBottomRight = "ScaleFromBottomRight", - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum ErrorCodes { - accessDenied = "AccessDenied", - generalException = "GeneralException", - invalidArgument = "InvalidArgument", - itemNotFound = "ItemNotFound", - notAllowed = "NotAllowed", - notImplemented = "NotImplemented", - searchDialogIsOpen = "SearchDialogIsOpen", - searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", - } - export namespace Interfaces { - /** - * Provides ways to load properties of only a subset of members of a collection. - */ - export interface CollectionLoadOptions { - /** - * Specify the number of items in the queried collection to be included in the result. - */ - $top?: number; - /** - * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. - */ - $skip?: number; - } - /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ - export interface AnnotationCollectionUpdateData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface for updating data on the `Application` object, for use in `application.set({ ... })`. */ - export interface ApplicationUpdateData { - - - } - /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ - export interface BodyUpdateData { - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ - export interface BorderUpdateData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface for updating data on the `BorderUniversal` object, for use in `borderUniversal.set({ ... })`. */ - export interface BorderUniversalUpdateData { - - - - - - - - } - /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ - export interface BorderCollectionUpdateData { - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor?: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor?: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - items?: Word.Interfaces.BorderData[]; - } - /** An interface for updating data on the `BorderUniversalCollection` object, for use in `borderUniversalCollection.set({ ... })`. */ - export interface BorderUniversalCollectionUpdateData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface for updating data on the `Break` object, for use in `break.set({ ... })`. */ - export interface BreakUpdateData { - - } - /** An interface for updating data on the `BreakCollection` object, for use in `breakCollection.set({ ... })`. */ - export interface BreakCollectionUpdateData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface for updating data on the `BuildingBlock` object, for use in `buildingBlock.set({ ... })`. */ - export interface BuildingBlockUpdateData { - - - - - } - /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ - export interface CheckboxContentControlUpdateData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ - export interface CommentUpdateData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ - export interface CommentCollectionUpdateData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ - export interface CommentContentRangeUpdateData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`. */ - export interface CommentReplyUpdateData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentUpdateData; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - } - /** An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... })`. */ - export interface CommentReplyCollectionUpdateData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface for updating data on the `XmlMapping` object, for use in `xmlMapping.set({ ... })`. */ - export interface XmlMappingUpdateData { - - - } - /** An interface for updating data on the `CustomXmlPrefixMappingCollection` object, for use in `customXmlPrefixMappingCollection.set({ ... })`. */ - export interface CustomXmlPrefixMappingCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface for updating data on the `CustomXmlSchemaCollection` object, for use in `customXmlSchemaCollection.set({ ... })`. */ - export interface CustomXmlSchemaCollectionUpdateData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface for updating data on the `CustomXmlNodeCollection` object, for use in `customXmlNodeCollection.set({ ... })`. */ - export interface CustomXmlNodeCollectionUpdateData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface for updating data on the `CustomXmlNode` object, for use in `customXmlNode.set({ ... })`. */ - export interface CustomXmlNodeUpdateData { - - - - - - - - - } - /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ - export interface ContentControlUpdateData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - } - /** An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ ... })`. */ - export interface ContentControlCollectionUpdateData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ - export interface ContentControlListItemUpdateData { - - - - } - /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ - export interface ContentControlListItemCollectionUpdateData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ - export interface CustomPropertyUpdateData { - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ ... })`. */ - export interface CustomPropertyCollectionUpdateData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface for updating data on the `CustomXmlPart` object, for use in `customXmlPart.set({ ... })`. */ - export interface CustomXmlPartUpdateData { - - } - /** An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... })`. */ - export interface CustomXmlPartCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in `customXmlPartScopedCollection.set({ ... })`. */ - export interface CustomXmlPartScopedCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `Document` object, for use in `document.set({ ... })`. */ - export interface DocumentUpdateData { - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - } - /** An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`. */ - export interface DocumentCreatedUpdateData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - } - /** An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. */ - export interface DocumentPropertiesUpdateData { - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface for updating data on the `Field` object, for use in `field.set({ ... })`. */ - export interface FieldUpdateData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeUpdateData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - } - /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ - export interface FieldCollectionUpdateData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface for updating data on the `Font` object, for use in `font.set({ ... })`. */ - export interface FontUpdateData { - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface for updating data on the `Hyperlink` object, for use in `hyperlink.set({ ... })`. */ - export interface HyperlinkUpdateData { - - - - - - - - } - /** An interface for updating data on the `HyperlinkCollection` object, for use in `hyperlinkCollection.set({ ... })`. */ - export interface HyperlinkCollectionUpdateData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`. */ - export interface InlinePictureUpdateData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... })`. */ - export interface InlinePictureCollectionUpdateData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`. */ - export interface ListCollectionUpdateData { - items?: Word.Interfaces.ListData[]; - } - /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ - export interface ListItemUpdateData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - } - /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ - export interface ListLevelUpdateData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ - export interface ListLevelCollectionUpdateData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ - export interface ListTemplateUpdateData { - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ - export interface NoteItemUpdateData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeUpdateData; - } - /** An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. */ - export interface NoteItemCollectionUpdateData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface for updating data on the `PageCollection` object, for use in `pageCollection.set({ ... })`. */ - export interface PageCollectionUpdateData { - items?: Word.Interfaces.PageData[]; - } - /** An interface for updating data on the `PaneCollection` object, for use in `paneCollection.set({ ... })`. */ - export interface PaneCollectionUpdateData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface for updating data on the `WindowCollection` object, for use in `windowCollection.set({ ... })`. */ - export interface WindowCollectionUpdateData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`. */ - export interface ParagraphUpdateData { - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemUpdateData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. */ - export interface ParagraphCollectionUpdateData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`. */ - export interface ParagraphFormatUpdateData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface for updating data on the `Range` object, for use in `range.set({ ... })`. */ - export interface RangeUpdateData { - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`. */ - export interface RangeCollectionUpdateData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`. */ - export interface SearchOptionsUpdateData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface for updating data on the `Section` object, for use in `section.set({ ... })`. */ - export interface SectionUpdateData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - - } - /** An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`. */ - export interface SectionCollectionUpdateData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`. */ - export interface SettingUpdateData { - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`. */ - export interface SettingCollectionUpdateData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`. */ - export interface StyleCollectionUpdateData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ - export interface StyleUpdateData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionUpdateData; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontUpdateData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateUpdateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingUpdateData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleUpdateData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - - - - - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`. */ - export interface ShadingUpdateData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface for updating data on the `ShadingUniversal` object, for use in `shadingUniversal.set({ ... })`. */ - export interface ShadingUniversalUpdateData { - - - - - - } - /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ - export interface TableUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ - export interface TableStyleUpdateData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`. */ - export interface TableCollectionUpdateData { - items?: Word.Interfaces.TableData[]; - } - /** An interface for updating data on the `TableColumn` object, for use in `tableColumn.set({ ... })`. */ - export interface TableColumnUpdateData { - - - - - } - /** An interface for updating data on the `TableColumnCollection` object, for use in `tableColumnCollection.set({ ... })`. */ - export interface TableColumnCollectionUpdateData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`. */ - export interface TableRowUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. */ - export interface TableRowCollectionUpdateData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`. */ - export interface TableCellUpdateData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. */ - export interface TableCellCollectionUpdateData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`. */ - export interface TableBorderUpdateData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `Template` object, for use in `template.set({ ... })`. */ - export interface TemplateUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `TemplateCollection` object, for use in `templateCollection.set({ ... })`. */ - export interface TemplateCollectionUpdateData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... })`. */ - export interface TrackedChangeCollectionUpdateData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface for updating data on the `Shape` object, for use in `shape.set({ ... })`. */ - export interface ShapeUpdateData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasUpdateData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillUpdateData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupUpdateData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameUpdateData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapUpdateData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface for updating data on the `ShapeGroup` object, for use in `shapeGroup.set({ ... })`. */ - export interface ShapeGroupUpdateData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `Canvas` object, for use in `canvas.set({ ... })`. */ - export interface CanvasUpdateData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `ShapeCollection` object, for use in `shapeCollection.set({ ... })`. */ - export interface ShapeCollectionUpdateData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface for updating data on the `ShapeFill` object, for use in `shapeFill.set({ ... })`. */ - export interface ShapeFillUpdateData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - } - /** An interface for updating data on the `TextFrame` object, for use in `textFrame.set({ ... })`. */ - export interface TextFrameUpdateData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface for updating data on the `ShapeTextWrap` object, for use in `shapeTextWrap.set({ ... })`. */ - export interface ShapeTextWrapUpdateData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface for updating data on the `RepeatingSectionItem` object, for use in `repeatingSectionItem.set({ ... })`. */ - export interface RepeatingSectionItemUpdateData { - - } - /** An interface for updating data on the `DatePickerContentControl` object, for use in `datePickerContentControl.set({ ... })`. */ - export interface DatePickerContentControlUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `PictureContentControl` object, for use in `pictureContentControl.set({ ... })`. */ - export interface PictureContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `GroupContentControl` object, for use in `groupContentControl.set({ ... })`. */ - export interface GroupContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `BuildingBlockGalleryContentControl` object, for use in `buildingBlockGalleryContentControl.set({ ... })`. */ - export interface BuildingBlockGalleryContentControlUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `RepeatingSectionContentControl` object, for use in `repeatingSectionContentControl.set({ ... })`. */ - export interface RepeatingSectionContentControlUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `Frame` object, for use in `frame.set({ ... })`. */ - export interface FrameUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `FrameCollection` object, for use in `frameCollection.set({ ... })`. */ - export interface FrameCollectionUpdateData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface for updating data on the `DocumentLibraryVersionCollection` object, for use in `documentLibraryVersionCollection.set({ ... })`. */ - export interface DocumentLibraryVersionCollectionUpdateData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface for updating data on the `ListFormat` object, for use in `listFormat.set({ ... })`. */ - export interface ListFormatUpdateData { - - - } - /** An interface for updating data on the `FillFormat` object, for use in `fillFormat.set({ ... })`. */ - export interface FillFormatUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `GlowFormat` object, for use in `glowFormat.set({ ... })`. */ - export interface GlowFormatUpdateData { - - - - } - /** An interface for updating data on the `LineFormat` object, for use in `lineFormat.set({ ... })`. */ - export interface LineFormatUpdateData { - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `ReflectionFormat` object, for use in `reflectionFormat.set({ ... })`. */ - export interface ReflectionFormatUpdateData { - - - - - - } - /** An interface for updating data on the `ColorFormat` object, for use in `colorFormat.set({ ... })`. */ - export interface ColorFormatUpdateData { - - - - - } - /** An interface for updating data on the `ShadowFormat` object, for use in `shadowFormat.set({ ... })`. */ - export interface ShadowFormatUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `ThreeDimensionalFormat` object, for use in `threeDimensionalFormat.set({ ... })`. */ - export interface ThreeDimensionalFormatUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `Bibliography` object, for use in `bibliography.set({ ... })`. */ - export interface BibliographyUpdateData { - - } - /** An interface for updating data on the `SourceCollection` object, for use in `sourceCollection.set({ ... })`. */ - export interface SourceCollectionUpdateData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface for updating data on the `PageSetup` object, for use in `pageSetup.set({ ... })`. */ - export interface PageSetupUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `LineNumbering` object, for use in `lineNumbering.set({ ... })`. */ - export interface LineNumberingUpdateData { - - - - - - } - /** An interface for updating data on the `TextColumnCollection` object, for use in `textColumnCollection.set({ ... })`. */ - export interface TextColumnCollectionUpdateData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface for updating data on the `TextColumn` object, for use in `textColumn.set({ ... })`. */ - export interface TextColumnUpdateData { - - - } - /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ - export interface CritiqueAnnotationData { - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: Word.Critique; - } - /** An interface describing the data returned by calling `annotation.toJSON()`. */ - export interface AnnotationData { - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - } - /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ - export interface AnnotationCollectionData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface describing the data returned by calling `application.toJSON()`. */ - export interface ApplicationData { - - - - } - /** An interface describing the data returned by calling `body.toJSON()`. */ - export interface BodyData { - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - } - /** An interface describing the data returned by calling `border.toJSON()`. */ - export interface BorderData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface describing the data returned by calling `borderUniversal.toJSON()`. */ - export interface BorderUniversalData { - - - - - - - - - } - /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ - export interface BorderCollectionData { - items?: Word.Interfaces.BorderData[]; - } - /** An interface describing the data returned by calling `borderUniversalCollection.toJSON()`. */ - export interface BorderUniversalCollectionData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface describing the data returned by calling `break.toJSON()`. */ - export interface BreakData { - - - } - /** An interface describing the data returned by calling `breakCollection.toJSON()`. */ - export interface BreakCollectionData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface describing the data returned by calling `buildingBlock.toJSON()`. */ - export interface BuildingBlockData { - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockCategory.toJSON()`. */ - export interface BuildingBlockCategoryData { - - - } - /** An interface describing the data returned by calling `buildingBlockTypeItem.toJSON()`. */ - export interface BuildingBlockTypeItemData { - - - } - /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ - export interface CheckboxContentControlData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface describing the data returned by calling `comment.toJSON()`. */ - export interface CommentData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - replies?: Word.Interfaces.CommentReplyData[]; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ - export interface CommentCollectionData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ - export interface CommentContentRangeData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface describing the data returned by calling `commentReply.toJSON()`. */ - export interface CommentReplyData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentData; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - } - /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ - export interface CommentReplyCollectionData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface describing the data returned by calling `xmlMapping.toJSON()`. */ - export interface XmlMappingData { - - - - - - } - /** An interface describing the data returned by calling `customXmlPrefixMappingCollection.toJSON()`. */ - export interface CustomXmlPrefixMappingCollectionData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface describing the data returned by calling `customXmlPrefixMapping.toJSON()`. */ - export interface CustomXmlPrefixMappingData { - - - } - /** An interface describing the data returned by calling `customXmlSchema.toJSON()`. */ - export interface CustomXmlSchemaData { - - - } - /** An interface describing the data returned by calling `customXmlSchemaCollection.toJSON()`. */ - export interface CustomXmlSchemaCollectionData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface describing the data returned by calling `customXmlNodeCollection.toJSON()`. */ - export interface CustomXmlNodeCollectionData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface describing the data returned by calling `customXmlNode.toJSON()`. */ - export interface CustomXmlNodeData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `contentControl.toJSON()`. */ - export interface ContentControlData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; - - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - - - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - } - /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ - export interface ContentControlCollectionData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ - export interface ContentControlListItemData { - - - - } - /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ - export interface ContentControlListItemCollectionData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface describing the data returned by calling `customProperty.toJSON()`. */ - export interface CustomPropertyData { - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ - export interface CustomPropertyCollectionData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ - export interface CustomXmlPartData { - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: string; - - } - /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ - export interface CustomXmlPartCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ - export interface CustomXmlPartScopedCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `document.toJSON()`. */ - export interface DocumentData { - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - activeWindow?: Word.Interfaces.WindowData; - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - windows?: Word.Interfaces.WindowData[]; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ - export interface DocumentCreatedData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ - export interface DocumentPropertiesData { - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - customProperties?: Word.Interfaces.CustomPropertyData[]; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ - export interface DropDownListContentControlData { - } - /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ - export interface ComboBoxContentControlData { - } - /** An interface describing the data returned by calling `field.toJSON()`. */ - export interface FieldData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - } - /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ - export interface FieldCollectionData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface describing the data returned by calling `font.toJSON()`. */ - export interface FontData { - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface describing the data returned by calling `hyperlink.toJSON()`. */ - export interface HyperlinkData { - - - - - - - - - - - } - /** An interface describing the data returned by calling `hyperlinkCollection.toJSON()`. */ - export interface HyperlinkCollectionData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ - export interface InlinePictureData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ - export interface InlinePictureCollectionData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface describing the data returned by calling `list.toJSON()`. */ - export interface ListData { - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: Word.ListLevelType[]; - } - /** An interface describing the data returned by calling `listCollection.toJSON()`. */ - export interface ListCollectionData { - items?: Word.Interfaces.ListData[]; - } - /** An interface describing the data returned by calling `listItem.toJSON()`. */ - export interface ListItemData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: number; - } - /** An interface describing the data returned by calling `listLevel.toJSON()`. */ - export interface ListLevelData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ - export interface ListLevelCollectionData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ - export interface ListTemplateData { - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listLevels?: Word.Interfaces.ListLevelData[]; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface describing the data returned by calling `noteItem.toJSON()`. */ - export interface NoteItemData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeData; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.NoteItemType | "Footnote" | "Endnote"; - } - /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ - export interface NoteItemCollectionData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface describing the data returned by calling `page.toJSON()`. */ - export interface PageData { - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** An interface describing the data returned by calling `pageCollection.toJSON()`. */ - export interface PageCollectionData { - items?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `pane.toJSON()`. */ - export interface PaneData { - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pagesEnclosingViewport?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `paneCollection.toJSON()`. */ - export interface PaneCollectionData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface describing the data returned by calling `window.toJSON()`. */ - export interface WindowData { - } - /** An interface describing the data returned by calling `windowCollection.toJSON()`. */ - export interface WindowCollectionData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface describing the data returned by calling `paragraph.toJSON()`. */ - export interface ParagraphData { - - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemData; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: string; - } - /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ - export interface ParagraphCollectionData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ - export interface ParagraphFormatData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface describing the data returned by calling `range.toJSON()`. */ - export interface RangeData { - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - } - /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ - export interface RangeCollectionData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ - export interface SearchOptionsData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface describing the data returned by calling `section.toJSON()`. */ - export interface SectionData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - - - - } - /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ - export interface SectionCollectionData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface describing the data returned by calling `setting.toJSON()`. */ - export interface SettingData { - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ - export interface SettingCollectionData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ - export interface StyleCollectionData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface describing the data returned by calling `style.toJSON()`. */ - export interface StyleData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderData[]; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface describing the data returned by calling `shading.toJSON()`. */ - export interface ShadingData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface describing the data returned by calling `shadingUniversal.toJSON()`. */ - export interface ShadingUniversalData { - - - - - - } - /** An interface describing the data returned by calling `table.toJSON()`. */ - export interface TableData { - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rows?: Word.Interfaces.TableRowData[]; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ - export interface TableStyleData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ - export interface TableCollectionData { - items?: Word.Interfaces.TableData[]; - } - /** An interface describing the data returned by calling `tableColumn.toJSON()`. */ - export interface TableColumnData { - - - - - - - - - - } - /** An interface describing the data returned by calling `tableColumnCollection.toJSON()`. */ - export interface TableColumnCollectionData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface describing the data returned by calling `tableRow.toJSON()`. */ - export interface TableRowData { - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cells?: Word.Interfaces.TableCellData[]; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ - export interface TableRowCollectionData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface describing the data returned by calling `tableCell.toJSON()`. */ - export interface TableCellData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ - export interface TableCellCollectionData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ - export interface TableBorderData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `template.toJSON()`. */ - export interface TemplateData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `templateCollection.toJSON()`. */ - export interface TemplateCollectionData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ - export interface TrackedChangeData { - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - } - /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ - export interface TrackedChangeCollectionData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface describing the data returned by calling `shape.toJSON()`. */ - export interface ShapeData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ - export interface ShapeGroupData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `canvas.toJSON()`. */ - export interface CanvasData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ - export interface ShapeCollectionData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ - export interface ShapeFillData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - } - /** An interface describing the data returned by calling `textFrame.toJSON()`. */ - export interface TextFrameData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface describing the data returned by calling `shapeTextWrap.toJSON()`. */ - export interface ShapeTextWrapData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface describing the data returned by calling `repeatingSectionItem.toJSON()`. */ - export interface RepeatingSectionItemData { - - } - /** An interface describing the data returned by calling `datePickerContentControl.toJSON()`. */ - export interface DatePickerContentControlData { - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `pictureContentControl.toJSON()`. */ - export interface PictureContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `groupContentControl.toJSON()`. */ - export interface GroupContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockGalleryContentControl.toJSON()`. */ - export interface BuildingBlockGalleryContentControlData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `repeatingSectionContentControl.toJSON()`. */ - export interface RepeatingSectionContentControlData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frame.toJSON()`. */ - export interface FrameData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frameCollection.toJSON()`. */ - export interface FrameCollectionData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface describing the data returned by calling `documentLibraryVersion.toJSON()`. */ - export interface DocumentLibraryVersionData { - - - - } - /** An interface describing the data returned by calling `documentLibraryVersionCollection.toJSON()`. */ - export interface DocumentLibraryVersionCollectionData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface describing the data returned by calling `listFormat.toJSON()`. */ - export interface ListFormatData { - - - - - - - - - } - /** An interface describing the data returned by calling `fillFormat.toJSON()`. */ - export interface FillFormatData { - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `glowFormat.toJSON()`. */ - export interface GlowFormatData { - - - - } - /** An interface describing the data returned by calling `lineFormat.toJSON()`. */ - export interface LineFormatData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `reflectionFormat.toJSON()`. */ - export interface ReflectionFormatData { - - - - - - } - /** An interface describing the data returned by calling `colorFormat.toJSON()`. */ - export interface ColorFormatData { - - - - - - } - /** An interface describing the data returned by calling `shadowFormat.toJSON()`. */ - export interface ShadowFormatData { - - - - - - - - - - - - } - /** An interface describing the data returned by calling `threeDimensionalFormat.toJSON()`. */ - export interface ThreeDimensionalFormatData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `bibliography.toJSON()`. */ - export interface BibliographyData { - - - } - /** An interface describing the data returned by calling `sourceCollection.toJSON()`. */ - export interface SourceCollectionData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface describing the data returned by calling `source.toJSON()`. */ - export interface SourceData { - - - - } - /** An interface describing the data returned by calling `pageSetup.toJSON()`. */ - export interface PageSetupData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `lineNumbering.toJSON()`. */ - export interface LineNumberingData { - - - - - - } - /** An interface describing the data returned by calling `textColumnCollection.toJSON()`. */ - export interface TextColumnCollectionData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface describing the data returned by calling `textColumn.toJSON()`. */ - export interface TextColumnData { - - - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CritiqueAnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - range?: Word.Interfaces.RangeLoadOptions; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: boolean; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ApplicationLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface BodyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSection?: Word.Interfaces.SectionLoadOptions; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * For EACH ITEM in the collection: Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CheckboxContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentContentRangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: boolean; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * For EACH ITEM in the collection: Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * For EACH ITEM in the collection: Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - - - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartScopedCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface DocumentLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: boolean; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentCreatedLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentPropertiesLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: boolean; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: boolean; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: boolean; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: boolean; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: boolean; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: boolean; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: boolean; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: boolean; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: boolean; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: boolean; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: boolean; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: boolean; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: boolean; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: boolean; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: boolean; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: boolean; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: boolean; - } - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface FontLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: boolean; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: boolean; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: boolean; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: boolean; - - } - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: boolean; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: boolean; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: boolean; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListTemplateLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * For EACH ITEM in the collection: Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ParagraphFormatLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: boolean; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: boolean; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: boolean; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: boolean; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: boolean; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SearchOptionsLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface StyleCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * For EACH ITEM in the collection: Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface StyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ShadingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: boolean; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: boolean; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: boolean; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TableStyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: boolean; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: boolean; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: boolean; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * For EACH ITEM in the collection: Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableBorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: boolean; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * For EACH ITEM in the collection: Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeGroupLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface CanvasLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * For EACH ITEM in the collection: Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * For EACH ITEM in the collection: Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * For EACH ITEM in the collection: Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * For EACH ITEM in the collection: Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * For EACH ITEM in the collection: The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * For EACH ITEM in the collection: The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * For EACH ITEM in the collection: The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeFillLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: boolean; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: boolean; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: boolean; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface TextFrameLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: boolean; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: boolean; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: boolean; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: boolean; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: boolean; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: boolean; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: boolean; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeTextWrapLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: boolean; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: boolean; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: boolean; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - - - - - - - - - - - - - - - - - - - - - - - - - - } -} -export declare namespace Word { - /** - * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. - */ - export class RequestContext extends OfficeExtension.ClientRequestContext { - constructor(url?: string); - readonly document: Document; - /** [Api set: WordApi 1.3] **/ - readonly application: Application; - } - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. - * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(batch: (context: Word.RequestContext) => Promise): Promise; -} - - -//////////////////////////////////////////////////////////////// -//////////////////////// End Word APIs ///////////////////////// -//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop3.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop3.d.ts deleted file mode 100644 index 37ea0a3674..0000000000 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop3.d.ts +++ /dev/null @@ -1,27081 +0,0 @@ -import { OfficeExtension } from "../../api-extractor-inputs-office/office" -import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" -//////////////////////////////////////////////////////////////// -/////////////////////// Begin Word APIs //////////////////////// -//////////////////////////////////////////////////////////////// - -export declare namespace Word { - /** - * Represents the color scheme of a critique in the document, affecting underline and highlight. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum CritiqueColorScheme { - /** - * Red color. - * @remarks - * [Api set: WordApi 1.7] - */ - red = "Red", - /** - * Green color. - * @remarks - * [Api set: WordApi 1.7] - */ - green = "Green", - /** - * Blue color. - * @remarks - * [Api set: WordApi 1.7] - */ - blue = "Blue", - /** - * Lavender color. - * @remarks - * [Api set: WordApi 1.7] - */ - lavender = "Lavender", - /** - * Berry color. - * @remarks - * [Api set: WordApi 1.7] - */ - berry = "Berry", - } - /** - * Properties defining the behavior of the pop-up menu for a given critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface CritiquePopupOptions { - /** - * Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in icon in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - brandingTextResourceId: string; - /** - * Gets the manifest resource ID of the string to use as the subtitle. - * - * @remarks - * [Api set: WordApi 1.8] - */ - subtitleResourceId: string; - /** - * Gets the suggestions to display in the critique pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - suggestions: string[]; - /** - * Gets the manifest resource ID of the string to use as the title. - * - * @remarks - * [Api set: WordApi 1.8] - */ - titleResourceId: string; - } - /** - * Critique that will be rendered as underline for the specified part of paragraph in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface Critique { - /** - * Specifies the color scheme of the critique. - * - * @remarks - * [Api set: WordApi 1.7] - */ - colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; - /** - * Specifies the length of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - length: number; - /** - * Specifies the behavior of the pop-up menu for the critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - popupOptions?: Word.CritiquePopupOptions; - /** - * Specifies the start index of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - start: number; - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CritiqueAnnotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly range: Word.Range; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critique: Word.Critique; - /** - * Accepts the critique. This will change the annotation state to `accepted`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - accept(): void; - /** - * Rejects the critique. This will change the annotation state to `rejected`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CritiqueAnnotation; - /** - * 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. - */ - track(): Word.CritiqueAnnotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CritiqueAnnotation; - /** - * 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's passed to it.) - * Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CritiqueAnnotationData; - } - /** - * Represents the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum AnnotationState { - /** - * Created. - * @remarks - * [Api set: WordApi 1.7] - */ - created = "Created", - /** - * Accepted. - * @remarks - * [Api set: WordApi 1.7] - */ - accepted = "Accepted", - /** - * Rejected. - * @remarks - * [Api set: WordApi 1.7] - */ - rejected = "Rejected", - } - /** - * Annotations set produced by the add-in. Currently supporting only critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationSet { - /** - * Critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiques: Word.Critique[]; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class Annotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critiqueAnnotation: Word.CritiqueAnnotation; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly id: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - /** - * Deletes the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Annotation; - /** - * 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. - */ - track(): Word.Annotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Annotation; - /** - * 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's passed to it.) - * Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.AnnotationData; - } - /** - * Holds annotation information that is passed back on annotation added event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationInsertedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation inserted event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationClickedEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Holds annotation information that is passed back on annotation removed event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationRemovedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation hovered event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationHoveredEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Represents action information that's passed back on annotation pop-up action event. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface AnnotationPopupActionEventArgs { - /** - * Specifies the chosen action in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - action: string; - /** - * Specifies the accepted suggestion (only populated when accepting a critique suggestion). - * - * @remarks - * [Api set: WordApi 1.8] - */ - critiqueSuggestion: string; - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.8] - */ - id: string; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class AnnotationCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Annotation[]; - /** - * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirst(): Word.Annotation; - /** - * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. - For further information, - see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirstOrNullObject(): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; - /** - * 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. - */ - track(): Word.AnnotationCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.AnnotationCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.AnnotationCollectionData; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Application extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Application): void; - /** - * Creates a new document by using an optional Base64-encoded .docx file. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param base64File - Optional. The Base64-encoded .docx file. The default value is null. - */ - createDocument(base64File?: string): Word.DocumentCreated; - /** - * Opens a document and displays it in a new tab or window. - The following are examples for the various supported clients and platforms. - - - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` - - - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` - - - Local location example for Mac and iOS: `/User/someone/document.docx` - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param filePath - Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. - */ - openDocument(filePath: string): void; - /** - * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param base64File - Required. The template file. - */ - retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ApplicationLoadOptions): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Application; - /** - * Create a new instance of the `Word.Application` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; - /** - * 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's passed to it.) - * Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ApplicationData; - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Body extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBodyOrNullObject: Word.Body; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSection: Word.Section; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSectionOrNullObject: Word.Section; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Body): void; - /** - * Clears the contents of the body object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Gets comments associated with the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the body. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the OOXML (Office Open XML) representation of the body object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole body, or the starting or ending point of the body, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the collection of the TrackedChange objects in the body. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; - /** - * Wraps the Body object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the document. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; - /** - * Inserts text into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. Can be a maximum of 255 characters. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Body; - /** - * 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. - */ - track(): Word.Body; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Body; - /** - * 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's passed to it.) - * Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BodyData; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class Border extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly location: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Border): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderLoadOptions): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Border; - /** - * 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. - */ - track(): Word.Border; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Border; - /** - * 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's passed to it.) - * Whereas the original `Word.Border` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BorderData; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class BorderCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Border[]; - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Gets the border that has the specified location. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getByLocation(borderLocation: Word.BorderLocation.top | Word.BorderLocation.left | Word.BorderLocation.bottom | Word.BorderLocation.right | Word.BorderLocation.insideHorizontal | Word.BorderLocation.insideVertical | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical"): Word.Border; - /** - * Gets the first border in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.Border; - /** - * Gets the first border in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.Border; - /** - * Gets a Border object by its index in the collection. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param index - A number that identifies the index location of a Border object. - */ - getItem(index: number): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.BorderCollection; - /** - * 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. - */ - track(): Word.BorderCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.BorderCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.BorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.BorderCollectionData; - } - - - - - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CheckboxContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CheckboxContentControl): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CheckboxContentControl; - /** - * 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. - */ - track(): Word.CheckboxContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CheckboxContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CheckboxContentControlData; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Comment extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly replies: Word.CommentReplyCollection; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Comment): void; - /** - * Deletes the comment and its replies. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Gets the range in the main document where the comment is on. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getRange(): Word.Range; - /** - * Adds a new reply to the end of the comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param replyText - Required. Reply text. - */ - reply(replyText: string): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Comment; - /** - * 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. - */ - track(): Word.Comment; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Comment; - /** - * 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's passed to it.) - * Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentData; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Comment[]; - /** - * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Comment; - /** - * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; - /** - * 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. - */ - track(): Word.CommentCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentCollectionData; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentContentRange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly isEmpty: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly text: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentContentRange): void; - /** - * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param text - Required. The text to be inserted in to the CommentContentRange. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentContentRange; - /** - * 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. - */ - track(): Word.CommentContentRange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentContentRange; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentContentRangeData; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReply extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentComment: Word.Comment; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentReply): void; - /** - * Deletes the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentReply; - /** - * 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. - */ - track(): Word.CommentReply; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReply; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentReplyData; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReplyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CommentReply[]; - /** - * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.CommentReply; - /** - * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; - /** - * 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. - */ - track(): Word.CommentReplyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReplyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentReplyCollectionData; - } - - - - - - - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly checkboxContentControl: Word.CheckboxContentControl; - - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - - - /** - * Gets the collection of endnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly id: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ContentControl): void; - /** - * Clears the contents of the content control. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param keepContent - Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. - */ - delete(keepContent: boolean): void; - /** - * Gets comments associated with the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported child content controls in this content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the Office Open XML (OOXML) representation of the content control object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole content control, or the starting or ending point of the content control, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the content control. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. Type of break. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; - /** - * Inserts a document into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts an inline picture into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns into, or next to, a content control. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. The text to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the content control into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ContentControl; - /** - * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDataChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDeleted: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is entered. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onEntered: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is exited, for example, when the cursor leaves the content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onExited: OfficeExtension.EventHandlers; - /** - * Occurs when selection within the content control is changed. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onSelectionChanged: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.ContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ContentControlData; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControlCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ContentControl[]; - /** - * Gets the content controls that have the specified tracking state. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param changeTrackingStates - Required. An array of content control change tracking states. - */ - getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; - /** - * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - Required. A content control identifier. - */ - getById(id: number): Word.ContentControl; - /** - * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A content control identifier. - */ - getByIdOrNullObject(id: number): Word.ContentControl; - /** - * Gets the content controls that have the specified tag. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param tag - Required. A tag set on a content control. - */ - getByTag(tag: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified title. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param title - Required. The title of a content control. - */ - getByTitle(title: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified types. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param types - Required. An array of content control types. - */ - getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; - /** - * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.ContentControl; - /** - * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.ContentControl; - /** - * Gets a content control by its ID. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - The content control's ID. - */ - getItem(id: number): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; - /** - * 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. - */ - track(): Word.ContentControlCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControlCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ContentControlCollectionData; - } - - - /** - * Specifies the options that define which content controls are returned. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlOptions { - /** - * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. - * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. - */ - types: Word.ContentControlType[]; - } - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomProperty extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly key: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomProperty): void; - /** - * Deletes the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomProperty; - /** - * 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. - */ - track(): Word.CustomProperty; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomProperty; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomPropertyData; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomPropertyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomProperty[]; - /** - * Creates a new or sets an existing custom property. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The custom property's key, which is case-insensitive. - * @param value - Required. The custom property's value. - */ - add(key: string, value: any): Word.CustomProperty; - /** - * Deletes all custom properties in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteAll(): void; - /** - * Gets the count of custom properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - The key that identifies the custom property object. - */ - getItem(key: string): Word.CustomProperty; - /** - * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The key that identifies the custom property object. - */ - getItemOrNullObject(key: string): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; - /** - * 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. - */ - track(): Word.CustomPropertyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomPropertyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomPropertyCollectionData; - } - - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPart extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly namespaceUri: string; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomXmlPartUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomXmlPart): void; - - /** - * Deletes the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Deletes an attribute with the given name from the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - */ - deleteAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string): void; - /** - * Deletes the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - deleteElement(xpath: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Gets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getXml(): OfficeExtension.ClientResult; - /** - * Inserts an attribute with the given name and value to the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. Value of the attribute. - */ - insertAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Inserts the given XML under the parent element identified by xpath at child position index. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single parent element in XPath notation. - * @param xml - Required. XML content to be inserted. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param index - Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. - */ - insertElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }, index?: number): void; - - /** - * Queries the XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. An XPath query. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @returns An array where each item represents an entry matched by the XPath query. - */ - query(xpath: string, namespaceMappings: { - [key: string]: string; - }): OfficeExtension.ClientResult; - - - /** - * Sets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content to be set. - */ - setXml(xml: string): void; - /** - * Updates the value of an attribute with the given name of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. New value of the attribute. - */ - updateAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Updates the XML of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param xml - Required. New XML content to be stored. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - updateElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomXmlPart; - /** - * 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. - */ - track(): Word.CustomXmlPart; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPart; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomXmlPartData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Adds a new custom XML part to the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content. Must be a valid XML fragment. - */ - add(xml: string): Word.CustomXmlPart; - /** - * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param namespaceUri - Required. The namespace URI. - */ - getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID or index of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartCollectionData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItem(): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItemOrNullObject(): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartScopedCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartScopedCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Document extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activeWindow: Word.Window; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly windows: Word.WindowCollection; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Document): void; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: Word.StyleType): Word.Style; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: Word.CloseBehavior): void; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: "Save" | "SkipSave"): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param filePath - Required. The path of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specifies the behavior of comparing document. - */ - compare(filePath: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64File - Required. The Base64-encoded content of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specify the behavior for comparing the documents. Note that the `compareTarget` option isn't allowed to be `CompareTargetSelected` in this API. - */ - compareFromBase64(base64File: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - - /** - * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param id - The ID of the annotation to get. - */ - getAnnotationById(id: string): Word.Annotation; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - /** - * Gets the currently supported content controls in the document. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets the document's endnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getEndnoteBody(): Word.Body; - /** - * Gets the document's footnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFootnoteBody(): Word.Body; - /** - * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param id - Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. - */ - getParagraphByUniqueLocalId(id: string): Word.Paragraph; - /** - * Gets the current selection of the document. Multiple selections aren't supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getSelection(): Word.Range; - /** - * Gets a StyleCollection object that represents the whole style set of the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getStyles(): Word.StyleCollection; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; - /** - * Inserts a document into the target document at a specific location with additional properties. - Headers, footers, watermarks, and other section properties are copied by default. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; - - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Document; - /** - * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationClicked: OfficeExtension.EventHandlers; - /** - * Occurs when the user hovers the cursor over an annotation. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationHovered: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationInserted: OfficeExtension.EventHandlers; - /** - * Occurs when the user performs an action in an annotation pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - * - * @eventproperty - */ - readonly onAnnotationPopupAction: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationRemoved: OfficeExtension.EventHandlers; - /** - * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onContentControlAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds new paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user changes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphDeleted: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.Document; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Document; - /** - * 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's passed to it.) - * Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentData; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentCreated extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentCreated): void; - - - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - - - - /** - * Opens the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - open(): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentCreated; - /** - * 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. - */ - track(): Word.DocumentCreated; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentCreated; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentCreatedData; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentProperties extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly customProperties: Word.CustomPropertyCollection; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly applicationName: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly creationDate: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastAuthor: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastPrintDate: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastSaveTime: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly revisionNumber: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly security: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly template: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentProperties): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentProperties; - /** - * 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. - */ - track(): Word.DocumentProperties; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentProperties; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentPropertiesData; - } - - - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class Field extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly result: Word.Range; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Field): void; - /** - * Deletes the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNext(): Word.Field; - /** - * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNextOrNullObject(): Word.Field; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Updates the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - updateResult(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Field; - /** - * 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. - */ - track(): Word.Field; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Field; - /** - * 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's passed to it.) - * Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FieldData; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class FieldCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Field[]; - /** - * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Field; - /** - * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Field; - /** - * Gets the Field object collection including the specified types of fields. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param types - Required. An array of field types. - */ - getByTypes(types: Word.FieldType[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; - /** - * 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. - */ - track(): Word.FieldCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.FieldCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.FieldCollectionData; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Font extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Font): void; - - - - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FontLoadOptions): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Font; - /** - * 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. - */ - track(): Word.Font; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Font; - /** - * 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's passed to it.) - * Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FontData; - } - - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePicture extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly paragraph: Word.Paragraph; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly imageFormat: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.InlinePicture): void; - /** - * Deletes the inline picture from the document. - * - * @remarks - * [Api set: WordApi 1.2] - */ - delete(): void; - /** - * Gets the Base64-encoded string representation of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getBase64ImageSrc(): OfficeExtension.ClientResult; - /** - * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.InlinePicture; - /** - * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.InlinePicture; - /** - * Gets the picture, or the starting or ending point of the picture, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Wraps the inline picture with a rich text content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts an inline picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.InlinePicture; - /** - * 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. - */ - track(): Word.InlinePicture; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePicture; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.InlinePictureData; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePictureCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.InlinePicture[]; - /** - * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.InlinePicture; - /** - * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; - /** - * 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. - */ - track(): Word.InlinePictureCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePictureCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.InlinePictureCollectionData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class List extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly id: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelExistences: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelTypes: Word.ListLevelType[]; - /** - * Gets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelFont(level: number): Word.Font; - /** - * Gets the paragraphs that occur at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelParagraphs(level: number): Word.ParagraphCollection; - /** - * Gets the Base64-encoded string representation of the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelPicture(level: number): OfficeExtension.ClientResult; - /** - * Gets the bullet, number, or picture at the specified level as a string. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelString(level: number): OfficeExtension.ClientResult; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Resets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param resetFontName - Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. - */ - resetLevelFont(level: number, resetFontName?: boolean): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: Word.Alignment): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; - /** - * Sets the two indents of the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param textIndent - Required. The text indent in points. It is the same as paragraph left indent. - * @param bulletNumberPictureIndent - Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. - */ - setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; - /** - * Sets the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param base64EncodedImage - Optional. The Base64-encoded image to be set. If not given, the default picture is set. - */ - setLevelPicture(level: number, base64EncodedImage?: string): void; - /** - * Sets the starting number at the specified level in the list. Default value is 1. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param startingNumber - Required. The number to start with. - */ - setLevelStartingNumber(level: number, startingNumber: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLoadOptions): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.List; - /** - * 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. - */ - track(): Word.List; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.List; - /** - * 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's passed to it.) - * Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListData; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.List[]; - /** - * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getById(id: number): Word.List; - /** - * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getByIdOrNullObject(id: number): Word.List; - /** - * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.List; - /** - * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.List; - /** - * Gets a list object by its ID. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - The list's ID. - */ - getItem(id: number): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; - /** - * 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. - */ - track(): Word.ListCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListCollectionData; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listString: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly siblingIndex: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListItem): void; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestor(parentOnly?: boolean): Word.Paragraph; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; - /** - * Gets all descendant list items of the list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param directChildrenOnly - Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. - */ - getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListItem; - /** - * 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. - */ - track(): Word.ListItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListItem; - /** - * 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's passed to it.) - * Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListItemData; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevel extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly font: Word.Font; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListLevel): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListLevel; - /** - * 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. - */ - track(): Word.ListLevel; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevel; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevel` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListLevelData; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevelCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ListLevel[]; - /** - * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.ListLevel; - /** - * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; - /** - * 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. - */ - track(): Word.ListLevelCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevelCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListLevelCollectionData; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListTemplate extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listLevels: Word.ListLevelCollection; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListTemplate): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListTemplate; - /** - * 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. - */ - track(): Word.ListTemplate; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListTemplate; - /** - * 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's passed to it.) - * Whereas the original `Word.ListTemplate` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListTemplateData; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly body: Word.Body; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly reference: Word.Range; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.NoteItemType | "Footnote" | "Endnote"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.NoteItem): void; - /** - * Deletes the note item. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNext(): Word.NoteItem; - /** - * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNextOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.NoteItem; - /** - * 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. - */ - track(): Word.NoteItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItem; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.NoteItemData; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItemCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.NoteItem[]; - /** - * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirst(): Word.NoteItem; - /** - * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirstOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; - /** - * 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. - */ - track(): Word.NoteItemCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItemCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.NoteItemCollectionData; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Page extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly height: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly index: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly width: number; - /** - * Gets the next page in the pane. Throws an `ItemNotFound` error if this page is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Page; - /** - * Gets the next page. If this page is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Page; - /** - * Gets the whole page, or the starting or ending point of the page, as a range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageLoadOptions): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Page; - /** - * 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. - */ - track(): Word.Page; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Page; - /** - * 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's passed to it.) - * Whereas the original `Word.Page` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PageData; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PageCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Page[]; - /** - * Gets the first page in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Page; - /** - * Gets the first page in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PageCollection; - /** - * 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. - */ - track(): Word.PageCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PageCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PageCollectionData; - } - /** - * Represents a window pane. The `Pane` object is a member of the pane collection. The pane collection includes all the window panes for a single window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Pane extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pagesEnclosingViewport: Word.PageCollection; - /** - * Gets the next pane in the window. Throws an `ItemNotFound` error if this pane is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Pane; - /** - * Gets the next pane. If this pane is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Pane; - /** - * 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. - */ - track(): Word.Pane; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Pane; - /** - * 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's passed to it.) - * Whereas the original `Word.Pane` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PaneData; - } - /** - * Represents the collection of pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PaneCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Pane[]; - /** - * Gets the first pane in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Pane; - /** - * Gets the first pane in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PaneCollection; - /** - * 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. - */ - track(): Word.PaneCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PaneCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PaneCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PaneCollectionData; - } - /** - * Represents the window that displays the document. A window can be split to contain multiple reading panes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Window extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active pane in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activePane: Word.Pane; - /** - * Gets the collection of panes in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly panes: Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Window; - /** - * 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. - */ - track(): Word.Window; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Window; - /** - * 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's passed to it.) - * Whereas the original `Word.Window` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.WindowData; - } - /** - * Represents the collection of window objects. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class WindowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Window[]; - /** - * Gets the first window in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Window; - /** - * Gets the first window in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.WindowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.WindowCollection; - /** - * 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. - */ - track(): Word.WindowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.WindowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.WindowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.WindowCollectionData; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Paragraph extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the collection of content control objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly list: Word.List; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItem: Word.ListItem; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItemOrNullObject: Word.ListItem; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listOrNullObject: Word.List; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isLastParagraph: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isListItem: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tableNestingLevel: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly uniqueLocalId: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Paragraph): void; - /** - * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param listId - Required. The ID of an existing list. - * @param level - Required. The level in the list. - */ - attachToList(listId: number, level: number): Word.List; - /** - * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the paragraph and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - /** - * Moves this paragraph out of its list, if the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - detachFromList(): void; - /** - * Gets annotations set on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - */ - getAnnotations(): Word.AnnotationCollection; - /** - * Gets comments associated with the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Paragraph; - /** - * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Paragraph; - /** - * Gets the Office Open XML (OOXML) representation of the paragraph object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPrevious(): Word.Paragraph; - /** - * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPreviousOrNullObject(): Word.Paragraph; - /** - * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). - By default, hidden text and text marked as deleted are excluded. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param options - Optional. Options that define whether the final result should include hidden text and text marked as deleted. - */ - getText(options?: Word.GetTextOptions | { - IncludeHiddenText?: boolean; - IncludeTextMarkedAsDeleted?: boolean; - }): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts annotations on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - * - * @param annotations - Annotations to set. - * @returns An array of the inserted annotations identifiers. - */ - insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the document. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Wraps the Paragraph object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Optional. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the paragraph into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Starts a new list with this paragraph. Fails if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - startNewList(): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Paragraph; - /** - * 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. - */ - track(): Word.Paragraph; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Paragraph; - /** - * 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's passed to it.) - * Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ParagraphCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Paragraph[]; - /** - * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Paragraph; - /** - * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLast(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLastOrNullObject(): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; - /** - * 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. - */ - track(): Word.ParagraphCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ParagraphCollectionData; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class ParagraphFormat extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ParagraphFormat): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ParagraphFormat; - /** - * 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. - */ - track(): Word.ParagraphFormat; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphFormat; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphFormatData; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Range extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of content control objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly inlinePictures: Word.InlinePictureCollection; - - /** - * Gets the collection of list objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the collection of paragraph objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - - /** - * Gets the collection of table objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isEmpty: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Range): void; - /** - * Clears the contents of the range object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Compares this range's location with another range's location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. The range to compare with this range. - */ - compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; - /** - * Deletes the range and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges don't have a union. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandTo(range: Word.Range): Word.Range; - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandToOrNullObject(range: Word.Range): Word.Range; - /** - * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param includeHidden - Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. - * @param includeAdjacent - Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. - */ - getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; - /** - * Gets comments associated with the range. - * - * @remarks - * [Api set: WordApi 1.4] - * @returns - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets hyperlink child ranges within the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getHyperlinkRanges(): Word.RangeCollection; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the OOXML representation of the range object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Clones the range, or gets the starting or ending point of the range as a new range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the range. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Highlights the range temporarily without changing document content. - To highlight the text permanently, set the range's Font.HighlightColor. - * - * @remarks - * [Api set: WordApi 1.8] - */ - highlight(): void; - /** - * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - insertBookmark(name: string): void; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of the canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Insert a comment on the range. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param commentText - Required. The comment text to be inserted. - * @returns comment object - */ - insertComment(commentText: string): Word.Comment; - /** - * Wraps the Range object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts an endnote. The endnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the endnote body. The default is "". - */ - insertEndnote(insertText?: string): Word.NoteItem; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a footnote. The footnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the footnote body. The default is "". - */ - insertFootnote(insertText?: string): Word.NoteItem; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Required. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWith(range: Word.Range): Word.Range; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWithOrNullObject(range: Word.Range): Word.Range; - /** - * Removes the highlight added by the Highlight function if any. - * - * @remarks - * [Api set: WordApi 1.8] - */ - removeHighlight(): void; - /** - * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the range into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Range; - /** - * 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. - */ - track(): Word.Range; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Range; - /** - * 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's passed to it.) - * Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.RangeData; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class RangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Range[]; - /** - * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Range; - /** - * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; - /** - * 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. - */ - track(): Word.RangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.RangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.RangeCollectionData; - } - /** - * Specifies the options to determine location and size when inserting a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface InsertShapeOptions { - /** - * Represents the height of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Represents the left position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * Represents the top position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * Represents the width of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** - * Specifies the options to determine what to copy when inserting a file. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface InsertFileOptions { - /** - * Represents whether the change tracking mode status from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importChangeTrackingMode?: boolean; - /** - * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomProperties?: boolean; - /** - * Represents whether the custom XML parts from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomXmlParts?: boolean; - /** - * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - importDifferentOddEvenPages?: boolean; - /** - * Represents whether the page color and other background information from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importPageColor?: boolean; - /** - * Represents whether the paragraph spacing from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importParagraphSpacing?: boolean; - /** - * Represents whether the styles from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importStyles?: boolean; - /** - * Represents whether the theme from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importTheme?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SearchOptions extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.SearchOptions): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.SearchOptions; - /** - * Create a new instance of the `Word.SearchOptions` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - /** - * 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's passed to it.) - * Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SearchOptionsData; - } - /** - * Specifies the options to be included in a getText operation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface GetTextOptions { - /** - * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeHiddenText?: boolean; - /** - * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeTextMarkedAsDeleted?: boolean; - } - /** - * Specifies the options to be included in a compare document operation. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface DocumentCompareOptions { - /** - * True adds the document to the list of recently used files on the File menu. The default value is True. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - addToRecentFiles?: boolean; - /** - * The reviewer name associated with the differences generated by the comparison. - If unspecified, the value defaults to the author name of the revised document or the string "Comparison" if no author information is present. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - authorName?: string; - /** - * The target document for the comparison. Default value is 'CompareTargetCurrent'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTarget?: Word.CompareTarget | "CompareTargetCurrent" | "CompareTargetSelected" | "CompareTargetNew"; - /** - * True (default) for the comparison to include detection of format changes. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - detectFormatChanges?: boolean; - /** - * True compares the documents without notifying a user of problems. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignoreAllComparisonWarnings?: boolean; - /** - * True removes date and time stamp information from tracked changes in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removeDateAndTime?: boolean; - /** - * True removes all user information from comments, revisions, and the properties dialog box in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removePersonalInformation?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Section extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Section): void; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Section; - /** - * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Section; - /** - * 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. - */ - track(): Word.Section; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Section; - /** - * 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's passed to it.) - * Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SectionData; - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SectionCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Section[]; - /** - * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Section; - /** - * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; - /** - * 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. - */ - track(): Word.SectionCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SectionCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SectionCollectionData; - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Setting extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly key: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Setting): void; - /** - * Deletes the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Setting; - /** - * 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. - */ - track(): Word.Setting; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Setting; - /** - * 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's passed to it.) - * Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SettingData; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class SettingCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Setting[]; - /** - * Creates a new setting or sets an existing setting. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The setting's key, which is case-sensitive. - * @param value - Required. The setting's value. - */ - add(key: string, value: any): Word.Setting; - /** - * Deletes all settings in this add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - deleteAll(): void; - /** - * Gets the count of settings. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - The key that identifies the setting object. - */ - getItem(key: string): Word.Setting; - /** - * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The key that identifies the setting object. - */ - getItemOrNullObject(key: string): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; - /** - * 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. - */ - track(): Word.SettingCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SettingCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SettingCollectionData; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class StyleCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Style[]; - /** - * Get the style object by its name. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByName(name: string): Word.Style; - /** - * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByNameOrNullObject(name: string): Word.Style; - /** - * Gets the number of the styles in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a style object by its index in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param index - A number that identifies the index location of a style object. - */ - getItem(index: number): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; - /** - * 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. - */ - track(): Word.StyleCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.StyleCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.StyleCollectionData; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Style extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly borders: Word.BorderCollection; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly font: Word.Font; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listTemplate: Word.ListTemplate; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly paragraphFormat: Word.ParagraphFormat; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly shading: Word.Shading; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly tableStyle: Word.TableStyle; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly builtIn: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly inUse: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly linked: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly nameLocal: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Style): void; - /** - * Deletes the style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Style; - /** - * 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. - */ - track(): Word.Style; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Style; - /** - * 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's passed to it.) - * Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.StyleData; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class Shading extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shading): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shading; - /** - * 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. - */ - track(): Word.Shading; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shading; - /** - * 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's passed to it.) - * Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShadingData; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Table extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of endnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rows: Word.TableRowCollection; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isUniform: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly nestingLevel: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowCount: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Table): void; - /** - * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; - /** - * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Autofits the table columns to the width of the window. - * - * @remarks - * [Api set: WordApi 1.3] - */ - autoFitWindow(): void; - /** - * Clears the contents of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Deletes specific columns. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param columnIndex - Required. The first column to delete. - * @param columnCount - Optional. The number of columns to delete. Default 1. - */ - deleteColumns(columnIndex: number, columnCount?: number): void; - /** - * Deletes specific rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The first row to delete. - * @param rowCount - Optional. The number of rows to delete. Default 1. - */ - deleteRows(rowIndex: number, rowCount?: number): void; - /** - * Distributes the column widths evenly. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - distributeColumns(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCell(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Table; - /** - * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Table; - /** - * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfter(): Word.Paragraph; - /** - * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfterOrNullObject(): Word.Paragraph; - /** - * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBefore(): Word.Paragraph; - /** - * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBeforeOrNullObject(): Word.Paragraph; - /** - * Gets the range that contains this table, or the range at the start or end of the table. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; - /** - * Inserts a content control on the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Merges the cells bounded inclusively by a first and last cell. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param topRow - Required. The row of the first cell - * @param firstCell - Required. The index of the first cell in its row - * @param bottomRow - Required. The row of the last cell - * @param lastCell - Required. The index of the last cell in its row - */ - mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableLoadOptions): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Table; - /** - * 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. - */ - track(): Word.Table; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Table; - /** - * 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's passed to it.) - * Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableData; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TableStyle extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableStyle): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableStyle; - /** - * 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. - */ - track(): Word.TableStyle; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableStyle; - /** - * 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's passed to it.) - * Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableStyleData; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Table[]; - /** - * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Table; - /** - * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; - /** - * 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. - */ - track(): Word.TableCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCollectionData; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRow extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cells: Word.TableCellCollection; - /** - * Gets the collection of endnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellCount: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isHeader: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableRow): void; - /** - * Clears the contents of the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableRow; - /** - * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableRow; - /** - * Inserts a content control on the row. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add - * @param values - Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Merges the row into one cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - merge(): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableRow; - /** - * 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. - */ - track(): Word.TableRow; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRow; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableRowData; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableRow[]; - /** - * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableRow; - /** - * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; - /** - * 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. - */ - track(): Word.TableRowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableRowCollectionData; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCell extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly body: Word.Body; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentRow: Word.TableRow; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellIndex: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableCell): void; - /** - * Deletes the column containing this cell. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteColumn(): void; - /** - * Deletes the row containing this cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteRow(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableCell; - /** - * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableCell; - /** - * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; - /** - * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Splits the cell into the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param rowCount - Required. The number of rows to split into. Must be a divisor of the number of underlying rows. - * @param columnCount - Required. The number of columns to split into. - */ - split(rowCount: number, columnCount: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableCell; - /** - * 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. - */ - track(): Word.TableCell; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCell; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableCellData; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCellCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableCell[]; - /** - * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableCell; - /** - * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; - /** - * 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. - */ - track(): Word.TableCellCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCellCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCellCollectionData; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableBorder extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableBorder): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableBorder; - /** - * 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. - */ - track(): Word.TableBorder; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableBorder; - /** - * 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's passed to it.) - * Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableBorderData; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly author: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly date: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly text: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - /** - * Accepts the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - accept(): void; - /** - * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNext(): Word.TrackedChange; - /** - * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNextOrNullObject(): Word.TrackedChange; - /** - * Gets the range of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Rejects the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TrackedChange; - /** - * 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. - */ - track(): Word.TrackedChange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChange; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TrackedChangeData; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TrackedChange[]; - /** - * Accepts all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - acceptAll(): void; - /** - * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirst(): Word.TrackedChange; - /** - * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirstOrNullObject(): Word.TrackedChange; - /** - * Rejects all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rejectAll(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; - /** - * 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. - */ - track(): Word.TrackedChangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TrackedChangeCollectionData; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Shape extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly body: Word.Body; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly canvas: Word.Canvas; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly fill: Word.ShapeFill; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentCanvas: Word.Shape; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentGroup: Word.Shape; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapeGroup: Word.ShapeGroup; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textFrame: Word.TextFrame; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textWrap: Word.ShapeTextWrap; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly isChild: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shape): void; - /** - * Deletes the shape and its content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - delete(): void; - /** - * Moves the shape horizontally by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved horizontally, in points. Use a positive value to move the shape right. Use a negative value to move the shape left. - */ - moveHorizontally(distance: number): void; - /** - * Moves the shape vertically by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved vertically, in points. Use a positive value to move the shape up. Use a negative value to move the shape down. - */ - moveVertically(distance: number): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Selects the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param selectMultipleShapes - Optional. Whether to select multiple floating shapes. The default value is false. - */ - select(selectMultipleShapes?: boolean): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeLoadOptions): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shape; - /** - * 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. - */ - track(): Word.Shape; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shape; - /** - * 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's passed to it.) - * Whereas the original `Word.Shape` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeData; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeGroup extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeGroupUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeGroup): void; - /** - * Ungroups any grouped shapes in the specified shape group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ungroup(): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeGroupLoadOptions): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeGroup; - /** - * 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. - */ - track(): Word.ShapeGroup; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeGroup; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeGroup` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeGroupData; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Canvas extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CanvasUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Canvas): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CanvasLoadOptions): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Canvas; - /** - * 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. - */ - track(): Word.Canvas; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Canvas; - /** - * 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's passed to it.) - * Whereas the original `Word.Canvas` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CanvasData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CanvasData; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Shape[]; - /** - * Gets the shapes that have the specified geometric types. Only applied to geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of geometric shape subtypes. - */ - getByGeometricTypes(types: Word.GeometricShapeType[]): Word.ShapeCollection; - /** - * Gets a shape by its identifier. Throws an `ItemNotFound` error if there isn't a shape with the identifier in this collection. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getById(id: number): Word.Shape; - /** - * Gets a shape by its identifier. If there isn't a shape with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getByIdOrNullObject(id: number): Word.Shape; - /** - * Gets the shapes by the identifiers. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param ids - Required. An array of shape identifiers. - */ - getByIds(ids: number[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified names. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param names - Required. An array of shape names. - */ - getByNames(names: string[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified types. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of shape types. - */ - getByTypes(types: Word.ShapeType[]): Word.ShapeCollection; - /** - * Gets the first shape in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Shape; - /** - * Gets the first shape in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Shape; - /** - * Groups floating shapes in this collection, inline shapes will be skipped. Returns a Shape object that represents the new group of shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group(): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ShapeCollection; - /** - * 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. - */ - track(): Word.ShapeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ShapeCollectionData; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeFill extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeFill): void; - /** - * Clears the fill formatting of this shape and set it to `Word.ShapeFillType.NoFill`; - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - clear(): void; - /** - * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Word.ShapeFillType.Solid`. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param color - A string that represents the fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - */ - setSolidColor(color: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeFillLoadOptions): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeFill; - /** - * 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. - */ - track(): Word.ShapeFill; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeFill; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeFillData; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class TextFrame extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly hasText: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TextFrameUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TextFrame): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TextFrameLoadOptions): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TextFrame; - /** - * 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. - */ - track(): Word.TextFrame; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TextFrame; - /** - * 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's passed to it.) - * Whereas the original `Word.TextFrame` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TextFrameData; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeTextWrap extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeTextWrapUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeTextWrap): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeTextWrapLoadOptions): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeTextWrap; - /** - * 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. - */ - track(): Word.ShapeTextWrap; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeTextWrap; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeTextWrap` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeTextWrapData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeTextWrapData; - } - - - - - - - - - - - - - - - /** - * Represents the possible change tracking modes. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingMode { - /** - * ChangeTracking is turned off. - * @remarks - * [Api set: WordApi 1.4] - */ - off = "Off", - /** - * ChangeTracking is turned on for everyone. - * @remarks - * [Api set: WordApi 1.4] - */ - trackAll = "TrackAll", - /** - * Tracking is turned on for my changes only. - * @remarks - * [Api set: WordApi 1.4] - */ - trackMineOnly = "TrackMineOnly", - } - /** - * Specify the current version or the original version of the text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingVersion { - /** - * @remarks - * [Api set: WordApi 1.4] - */ - original = "Original", - /** - * @remarks - * [Api set: WordApi 1.4] - */ - current = "Current", - } - /** - * Specify the track state when ChangeTracking is on. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum ChangeTrackingState { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - added = "Added", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - deleted = "Deleted", - } - /** - * TrackedChange type. - * - * @remarks - * [Api set: WordApi 1.6] - */ - enum TrackedChangeType { - /** - * No revision. - * @remarks - * [Api set: WordApi 1.6] - */ - none = "None", - /** - * Add change. - * @remarks - * [Api set: WordApi 1.6] - */ - added = "Added", - /** - * Delete change. - * @remarks - * [Api set: WordApi 1.6] - */ - deleted = "Deleted", - /** - * Format change. - * @remarks - * [Api set: WordApi 1.6] - */ - formatted = "Formatted", - } - /** - * Note item type - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum NoteItemType { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - } - /** - * Provides information about the type of a raised event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventType { - /** - * ContentControlDeleted represents the event that the content control has been deleted. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDeleted = "ContentControlDeleted", - /** - * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlSelectionChanged = "ContentControlSelectionChanged", - /** - * ContentControlDataChanged represents the event that the data in the content control have been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDataChanged = "ContentControlDataChanged", - /** - * ContentControlAdded represents the event a content control has been added to the document. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlAdded = "ContentControlAdded", - /** - * Represents that a content control has been entered. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlEntered = "ContentControlEntered", - /** - * Represents that a content control has been exited. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlExited = "ContentControlExited", - /** - * Represents that one or more new paragraphs were added. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphAdded = "ParagraphAdded", - /** - * Represents that one or more paragraphs were changed. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphChanged = "ParagraphChanged", - /** - * Represents that one or more paragraphs were deleted. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphDeleted = "ParagraphDeleted", - /** - * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationClicked = "AnnotationClicked", - /** - * Represents that an annotation was hovered over in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationHovered = "AnnotationHovered", - /** - * Represents that one or more annotations were added in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationInserted = "AnnotationInserted", - /** - * Represents that one or more annotations were deleted from the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationRemoved = "AnnotationRemoved", - /** - * Represents an action in the annotation pop-up. - * @remarks - * [Api set: WordApi 1.8] - */ - annotationPopupAction = "AnnotationPopupAction", - } - /** - * An enum that specifies an event's source. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventSource { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - local = "Local", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - remote = "Remote", - } - /** - * Provides information about the content control that raised contentControlAdded event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlAddedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDataChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDataChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDeleted event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDeletedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlEntered event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlEnteredEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlExited event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlExitedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlSelectionChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlSelectionChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the paragraphs that raised the paragraphAdded event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphAddedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphChanged event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphChangedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphDeleted event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphDeletedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Specifies supported content control types and subtypes. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum ContentControlType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextInline = "RichTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextParagraphs = "RichTextParagraphs", - /** - * Contains a whole cell. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableCell = "RichTextTableCell", - /** - * Contains a whole row. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableRow = "RichTextTableRow", - /** - * Contains a whole table. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTable = "RichTextTable", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextInline = "PlainTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextParagraph = "PlainTextParagraph", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - picture = "Picture", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - buildingBlockGallery = "BuildingBlockGallery", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - checkBox = "CheckBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - comboBox = "ComboBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dropDownList = "DropDownList", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - datePicker = "DatePicker", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - repeatingSection = "RepeatingSection", - /** - * Identifies a rich text content control. - * @remarks - * [Api set: WordApi 1.1] - */ - richText = "RichText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainText = "PlainText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - group = "Group", - } - /** - * ContentControl appearance. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Content control appearance options are BoundingBox, Tags, or Hidden. - */ - enum ContentControlAppearance { - /** - * Represents a content control shown as a shaded rectangle or bounding box (with optional title). - * @remarks - * [Api set: WordApi 1.1] - */ - boundingBox = "BoundingBox", - /** - * Represents a content control shown as start and end markers. - * @remarks - * [Api set: WordApi 1.1] - */ - tags = "Tags", - /** - * Represents a content control that isn't shown. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - } - - /** - * The supported styles for underline format. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum UnderlineType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * No underline. - * @remarks - * [Api set: WordApi 1.1] - */ - none = "None", - /** - * Warning: hidden has been deprecated. - * @deprecated Hidden is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - /** - * Warning: dotLine has been deprecated. - * @deprecated DotLine is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - dotLine = "DotLine", - /** - * A single underline. This is the default value. - * @remarks - * [Api set: WordApi 1.1] - */ - single = "Single", - /** - * Only underline individual words. - * @remarks - * [Api set: WordApi 1.1] - */ - word = "Word", - /** - * A double underline. - * @remarks - * [Api set: WordApi 1.1] - */ - double = "Double", - /** - * A single thick underline. - * @remarks - * [Api set: WordApi 1.1] - */ - thick = "Thick", - /** - * A dotted underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dottedHeavy = "DottedHeavy", - /** - * A single dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dashLine = "DashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineHeavy = "DashLineHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLong = "DashLineLong", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLongHeavy = "DashLineLongHeavy", - /** - * An alternating dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLine = "DotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLineHeavy = "DotDashLineHeavy", - /** - * An alternating dot-dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLine = "TwoDotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLineHeavy = "TwoDotDashLineHeavy", - /** - * A single wavy underline. - * @remarks - * [Api set: WordApi 1.1] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveHeavy = "WaveHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveDouble = "WaveDouble", - } - /** - * Specifies the form of a break. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum BreakType { - /** - * Page break at the insertion point. - * @remarks - * [Api set: WordApi 1.1] - */ - page = "Page", - /** - * Warning: next has been deprecated. Use sectionNext instead. - * @deprecated Use sectionNext instead. - * @remarks - * [Api set: WordApi 1.1] - */ - next = "Next", - /** - * Section break on next page. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionNext = "SectionNext", - /** - * New section without a corresponding page break. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionContinuous = "SectionContinuous", - /** - * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionEven = "SectionEven", - /** - * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionOdd = "SectionOdd", - /** - * Line break. - * @remarks - * [Api set: WordApi 1.1] - */ - line = "Line", - } - /** - * The insertion location types. - * - * @remarks - * [Api set: WordApi 1.1] - * - * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. - * If the location is "Before" or "After", the new content will be outside of the modified object. - * If the location is "Start" or "End", the new content will be included as part of the modified object. - */ - enum InsertLocation { - /** - * Add content before the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - before = "Before", - /** - * Add content after the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - after = "After", - /** - * Prepend content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * Append content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - /** - * Replace the contents of the current object. - * @remarks - * [Api set: WordApi 1.1] - */ - replace = "Replace", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum Alignment { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * Unknown alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * Alignment to the left. - * @remarks - * [Api set: WordApi 1.1] - */ - left = "Left", - /** - * Alignment to the center. - * @remarks - * [Api set: WordApi 1.1] - */ - centered = "Centered", - /** - * Alignment to the right. - * @remarks - * [Api set: WordApi 1.1] - */ - right = "Right", - /** - * Fully justified alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - justified = "Justified", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum HeaderFooterType { - /** - * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. - * @remarks - * [Api set: WordApi 1.1] - */ - primary = "Primary", - /** - * Returns the header or footer on the first page of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - firstPage = "FirstPage", - /** - * Returns all headers or footers on even-numbered pages of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - evenPages = "EvenPages", - } - /** - * Represents the types of body objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum BodyType { - /** - * Unknown body type. - * @remarks - * [Api set: WordApi 1.3] - */ - unknown = "Unknown", - /** - * Main document body. - * @remarks - * [Api set: WordApi 1.3] - */ - mainDoc = "MainDoc", - /** - * Section body. - * @remarks - * [Api set: WordApi 1.3] - */ - section = "Section", - /** - * Header body. - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * Footer body. - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * Table cell body. - * @remarks - * [Api set: WordApi 1.3] - */ - tableCell = "TableCell", - /** - * Footnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * Endnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - /** - * Note body e.g., endnote, footnote. - * @remarks - * [Api set: WordApi 1.5] - */ - noteItem = "NoteItem", - } - /** - * This enum sets where the cursor (insertion point) in the document is after a selection. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SelectionMode { - /** - * The entire range is selected. - * @remarks - * [Api set: WordApi 1.1] - */ - select = "Select", - /** - * The cursor is at the beginning of the selection (just before the start of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * The cursor is at the end of the selection (just after the end of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImageFormat { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - unsupported = "Unsupported", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - undefined = "Undefined", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bmp = "Bmp", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - jpeg = "Jpeg", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gif = "Gif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tiff = "Tiff", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - png = "Png", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - icon = "Icon", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - exif = "Exif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - wmf = "Wmf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - emf = "Emf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pict = "Pict", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pdf = "Pdf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - svg = "Svg", - } - /** - * Represents the location of a range. You can get range by calling getRange on different objects such as {@link Word.Paragraph} and {@link Word.ContentControl}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum RangeLocation { - /** - * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. - * @remarks - * [Api set: WordApi 1.3] - */ - whole = "Whole", - /** - * The starting point of the object. For content control, it's the point after the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - start = "Start", - /** - * The ending point of the object. For paragraph, it's the point before the EOP (end of paragraph). For content control, it's the point before the closing tag. - * @remarks - * [Api set: WordApi 1.3] - */ - end = "End", - /** - * For content control only. It's the point before the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * The point after the object. If the object is a paragraph content control or table content control, it's the point after the EOP or Table characters. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - /** - * The range between 'Start' and 'End'. - * @remarks - * [Api set: WordApi 1.3] - */ - content = "Content", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum LocationRelation { - /** - * Indicates that this instance and the range are in different sub-documents. - * @remarks - * [Api set: WordApi 1.3] - */ - unrelated = "Unrelated", - /** - * Indicates that this instance and the range represent the same range. - * @remarks - * [Api set: WordApi 1.3] - */ - equal = "Equal", - /** - * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsStart = "ContainsStart", - /** - * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsEnd = "ContainsEnd", - /** - * Indicates that this instance contains the range, with the exception of the start and end character of this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - contains = "Contains", - /** - * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideStart = "InsideStart", - /** - * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideEnd = "InsideEnd", - /** - * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * Indicates that this instance occurs before, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentBefore = "AdjacentBefore", - /** - * Indicates that this instance starts before the range and overlaps the range's first character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsBefore = "OverlapsBefore", - /** - * Indicates that this instance occurs before the range. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * Indicates that this instance occurs after, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentAfter = "AdjacentAfter", - /** - * Indicates that this instance starts inside the range and overlaps the range’s last character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsAfter = "OverlapsAfter", - /** - * Indicates that this instance occurs after the range. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideHorizontal = "InsideHorizontal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideVertical = "InsideVertical", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - outside = "Outside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - all = "All", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum CellPaddingLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - } - /** - * Represents the width of a style's border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum BorderWidth { - /** - * None width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * 0.25 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt025 = "Pt025", - /** - * 0.50 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt050 = "Pt050", - /** - * 0.75 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt075 = "Pt075", - /** - * 1.00 point. This is the default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt100 = "Pt100", - /** - * 1.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt150 = "Pt150", - /** - * 2.25 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt225 = "Pt225", - /** - * 3.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt300 = "Pt300", - /** - * 4.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt450 = "Pt450", - /** - * 6.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt600 = "Pt600", - /** - * Mixed width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - mixed = "Mixed", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - single = "Single", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - double = "Double", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashed = "Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotDashed = "DotDashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dot2Dashed = "Dot2Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - triple = "Triple", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickSmall = "ThinThickSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinSmall = "ThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinSmall = "ThinThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickMed = "ThinThickMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinMed = "ThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinMed = "ThinThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickLarge = "ThinThickLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinLarge = "ThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinLarge = "ThinThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - doubleWave = "DoubleWave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashedSmall = "DashedSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashDotStroked = "DashDotStroked", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEmboss = "ThreeDEmboss", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEngrave = "ThreeDEngrave", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum VerticalAlignment { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - center = "Center", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListLevelType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - picture = "Picture", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListBullet { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - custom = "Custom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - solid = "Solid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hollow = "Hollow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - square = "Square", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - diamonds = "Diamonds", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arrow = "Arrow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - checkmark = "Checkmark", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListNumbering { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerLetter = "LowerLetter", - } - /** - * Represents the built-in style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - * - * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. - */ - enum BuiltInStyleName { - /** - * Mixed styles or other style not in this list. - * @remarks - * [Api set: WordApi 1.3] - */ - other = "Other", - /** - * Reset character and paragraph style to default. - * @remarks - * [Api set: WordApi 1.3] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading1 = "Heading1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading2 = "Heading2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading3 = "Heading3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading4 = "Heading4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading5 = "Heading5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading6 = "Heading6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading7 = "Heading7", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading8 = "Heading8", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading9 = "Heading9", - /** - * Table-of-content level 1. - * @remarks - * [Api set: WordApi 1.3] - */ - toc1 = "Toc1", - /** - * Table-of-content level 2. - * @remarks - * [Api set: WordApi 1.3] - */ - toc2 = "Toc2", - /** - * Table-of-content level 3. - * @remarks - * [Api set: WordApi 1.3] - */ - toc3 = "Toc3", - /** - * Table-of-content level 4. - * @remarks - * [Api set: WordApi 1.3] - */ - toc4 = "Toc4", - /** - * Table-of-content level 5. - * @remarks - * [Api set: WordApi 1.3] - */ - toc5 = "Toc5", - /** - * Table-of-content level 6. - * @remarks - * [Api set: WordApi 1.3] - */ - toc6 = "Toc6", - /** - * Table-of-content level 7. - * @remarks - * [Api set: WordApi 1.3] - */ - toc7 = "Toc7", - /** - * Table-of-content level 8. - * @remarks - * [Api set: WordApi 1.3] - */ - toc8 = "Toc8", - /** - * Table-of-content level 9. - * @remarks - * [Api set: WordApi 1.3] - */ - toc9 = "Toc9", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteText = "FootnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - caption = "Caption", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteReference = "FootnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteReference = "EndnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteText = "EndnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - title = "Title", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtitle = "Subtitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink = "Hyperlink", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - strong = "Strong", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - emphasis = "Emphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - noSpacing = "NoSpacing", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listParagraph = "ListParagraph", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - quote = "Quote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseQuote = "IntenseQuote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleEmphasis = "SubtleEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseEmphasis = "IntenseEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleReference = "SubtleReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseReference = "IntenseReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bookTitle = "BookTitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bibliography = "Bibliography", - /** - * Table-of-content heading. - * @remarks - * [Api set: WordApi 1.3] - */ - tocHeading = "TocHeading", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGrid = "TableGrid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable1 = "PlainTable1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable2 = "PlainTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable3 = "PlainTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable4 = "PlainTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable5 = "PlainTable5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGridLight = "TableGridLight", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light = "GridTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent1 = "GridTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent2 = "GridTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent3 = "GridTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent4 = "GridTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent5 = "GridTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent6 = "GridTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2 = "GridTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent1 = "GridTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent2 = "GridTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent3 = "GridTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent4 = "GridTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent5 = "GridTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent6 = "GridTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3 = "GridTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent1 = "GridTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent2 = "GridTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent3 = "GridTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent4 = "GridTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent5 = "GridTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent6 = "GridTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4 = "GridTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent1 = "GridTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent2 = "GridTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent3 = "GridTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent4 = "GridTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent5 = "GridTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent6 = "GridTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark = "GridTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful = "GridTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful = "GridTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light = "ListTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent1 = "ListTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent2 = "ListTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent3 = "ListTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent4 = "ListTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent5 = "ListTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent6 = "ListTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2 = "ListTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent1 = "ListTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent2 = "ListTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent3 = "ListTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent4 = "ListTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent5 = "ListTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent6 = "ListTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3 = "ListTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent1 = "ListTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent2 = "ListTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent3 = "ListTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent4 = "ListTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent5 = "ListTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent6 = "ListTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4 = "ListTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent1 = "ListTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent2 = "ListTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent3 = "ListTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent4 = "ListTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent5 = "ListTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent6 = "ListTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark = "ListTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent1 = "ListTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent2 = "ListTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent3 = "ListTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent4 = "ListTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent5 = "ListTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent6 = "ListTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful = "ListTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful = "ListTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum DocumentPropertyType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - string = "String", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - date = "Date", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - boolean = "Boolean", - } - /** - * Represents the type of style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum StyleType { - /** - * Represents that the style is a character style. - * @remarks - * [Api set: WordApi 1.5] - */ - character = "Character", - /** - * Represents that the style is a list style. Currently supported on desktop. - * @remarks - * [Api set: WordApi 1.5] - */ - list = "List", - /** - * Represents that the style is a paragraph style. - * @remarks - * [Api set: WordApi 1.5] - */ - paragraph = "Paragraph", - /** - * Represents that the style is a table style. - * @remarks - * [Api set: WordApi 1.5] - */ - table = "Table", - } - /** - * Represents the outline levels. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum OutlineLevel { - /** - * Represents outline level 1. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel1 = "OutlineLevel1", - /** - * Represents outline level 2. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel2 = "OutlineLevel2", - /** - * Represents outline level 3. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel3 = "OutlineLevel3", - /** - * Represents outline level 4. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel4 = "OutlineLevel4", - /** - * Represents outline level 5. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel5 = "OutlineLevel5", - /** - * Represents outline level 6. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel6 = "OutlineLevel6", - /** - * Represents outline level 7. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel7 = "OutlineLevel7", - /** - * Represents outline level 8. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel8 = "OutlineLevel8", - /** - * Represents outline level 9. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel9 = "OutlineLevel9", - /** - * Represents outline level body text, not an outline level. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevelBodyText = "OutlineLevelBodyText", - } - /** - * Specifies the close behavior for `Document.close`. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum CloseBehavior { - /** - * Saves the changes before closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - save = "Save", - /** - * Discard the possible changes when closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - skipSave = "SkipSave", - } - /** - * Specifies the save behavior for `Document.save`. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SaveBehavior { - /** - * Saves the document without prompting the user. If it's a new document, - it will be saved with the default name or specified name in the default location. - * @remarks - * [Api set: WordApi 1.1] - */ - save = "Save", - /** - * Displays the "Save As" dialog to the user if the document hasn't been saved. - Won't take effect if the document was previously saved. - * @remarks - * [Api set: WordApi 1.1] - */ - prompt = "Prompt", - } - /** - * Represents the type of Field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldType { - /** - * Represents that the field type is Add-in. - * @remarks - * [Api set: WordApi 1.5] - */ - addin = "Addin", - /** - * Represents that the field type is AddressBlock. - * @remarks - * [Api set: WordApi 1.5] - */ - addressBlock = "AddressBlock", - /** - * Represents that the field type is Advance. - * @remarks - * [Api set: WordApi 1.5] - */ - advance = "Advance", - /** - * Represents that the field type is Ask. - * @remarks - * [Api set: WordApi 1.5] - */ - ask = "Ask", - /** - * Represents that the field type is Author. - * @remarks - * [Api set: WordApi 1.5] - */ - author = "Author", - /** - * Represents that the field type is AutoText. - * @remarks - * [Api set: WordApi 1.5] - */ - autoText = "AutoText", - /** - * Represents that the field type is AutoTextList. - * @remarks - * [Api set: WordApi 1.5] - */ - autoTextList = "AutoTextList", - /** - * Represents that the field type is Barcode. - * @remarks - * [Api set: WordApi 1.5] - */ - barCode = "BarCode", - /** - * Represents that the field type is Bibliography. - * @remarks - * [Api set: WordApi 1.5] - */ - bibliography = "Bibliography", - /** - * Represents that the field type is BidiOutline. - * @remarks - * [Api set: WordApi 1.5] - */ - bidiOutline = "BidiOutline", - /** - * Represents that the field type is Citation. - * @remarks - * [Api set: WordApi 1.5] - */ - citation = "Citation", - /** - * Represents that the field type is Comments. - * @remarks - * [Api set: WordApi 1.5] - */ - comments = "Comments", - /** - * Represents that the field type is Compare. - * @remarks - * [Api set: WordApi 1.5] - */ - compare = "Compare", - /** - * Represents that the field type is CreateDate. - * @remarks - * [Api set: WordApi 1.5] - */ - createDate = "CreateDate", - /** - * Represents that the field type is Data. - * @remarks - * [Api set: WordApi 1.5] - */ - data = "Data", - /** - * Represents that the field type is Database. - * @remarks - * [Api set: WordApi 1.5] - */ - database = "Database", - /** - * Represents that the field type is Date. - * @remarks - * [Api set: WordApi 1.5] - */ - date = "Date", - /** - * Represents that the field type is DisplayBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - displayBarcode = "DisplayBarcode", - /** - * Represents that the field type is DocumentProperty - * @remarks - * [Api set: WordApi 1.5] - */ - docProperty = "DocProperty", - /** - * Represents that the field type is DocumentVariable. - * @remarks - * [Api set: WordApi 1.5] - */ - docVariable = "DocVariable", - /** - * Represents that the field type is EditTime. - * @remarks - * [Api set: WordApi 1.5] - */ - editTime = "EditTime", - /** - * Represents that the field type is Embedded. - * @remarks - * [Api set: WordApi 1.5] - */ - embedded = "Embedded", - /** - * Represents that the field type is Equation. - * @remarks - * [Api set: WordApi 1.5] - */ - eq = "EQ", - /** - * Represents that the field type is Expression. - * @remarks - * [Api set: WordApi 1.5] - */ - expression = "Expression", - /** - * Represents that the field type is FileName. - * @remarks - * [Api set: WordApi 1.5] - */ - fileName = "FileName", - /** - * Represents that the field type is FileSize. - * @remarks - * [Api set: WordApi 1.5] - */ - fileSize = "FileSize", - /** - * Represents that the field type is FillIn. - * @remarks - * [Api set: WordApi 1.5] - */ - fillIn = "FillIn", - /** - * Represents that the field type is FormCheckbox. - * @remarks - * [Api set: WordApi 1.5] - */ - formCheckbox = "FormCheckbox", - /** - * Represents that the field type is FormDropdown. - * @remarks - * [Api set: WordApi 1.5] - */ - formDropdown = "FormDropdown", - /** - * Represents that the field type is FormText. - * @remarks - * [Api set: WordApi 1.5] - */ - formText = "FormText", - /** - * Represents that the field type is GotoButton. - * @remarks - * [Api set: WordApi 1.5] - */ - gotoButton = "GotoButton", - /** - * Represents that the field type is GreetingLine. - * @remarks - * [Api set: WordApi 1.5] - */ - greetingLine = "GreetingLine", - /** - * Represents that the field type is Hyperlink. - * @remarks - * [Api set: WordApi 1.5] - */ - hyperlink = "Hyperlink", - /** - * Represents that the field type is If. - * @remarks - * [Api set: WordApi 1.5] - */ - if = "If", - /** - * Represents that the field type is Import. - * @remarks - * [Api set: WordApi 1.5] - */ - import = "Import", - /** - * Represents that the field type is Include. - * @remarks - * [Api set: WordApi 1.5] - */ - include = "Include", - /** - * Represents that the field type is IncludePicture. - * @remarks - * [Api set: WordApi 1.5] - */ - includePicture = "IncludePicture", - /** - * Represents that the field type is IncludeText. - * @remarks - * [Api set: WordApi 1.5] - */ - includeText = "IncludeText", - /** - * Represents that the field type is Index. - * @remarks - * [Api set: WordApi 1.5] - */ - index = "Index", - /** - * Represents that the field type is Information. - * @remarks - * [Api set: WordApi 1.5] - */ - info = "Info", - /** - * Represents that the field type is Keywords. - * @remarks - * [Api set: WordApi 1.5] - */ - keywords = "Keywords", - /** - * Represents that the field type is LastSavedBy. - * @remarks - * [Api set: WordApi 1.5] - */ - lastSavedBy = "LastSavedBy", - /** - * Represents that the field type is Link. - * @remarks - * [Api set: WordApi 1.5] - */ - link = "Link", - /** - * Represents that the field type is ListNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - listNum = "ListNum", - /** - * Represents that the field type is MacroButton. - * @remarks - * [Api set: WordApi 1.5] - */ - macroButton = "MacroButton", - /** - * Represents that the field type is MergeBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeBarcode = "MergeBarcode", - /** - * Represents that the field type is MergeField. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeField = "MergeField", - /** - * Represents that the field type is MergeRecord. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeRec = "MergeRec", - /** - * Represents that the field type is MergeSequence. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeSeq = "MergeSeq", - /** - * Represents that the field type is Next. - * @remarks - * [Api set: WordApi 1.5] - */ - next = "Next", - /** - * Represents that the field type is NextIf. - * @remarks - * [Api set: WordApi 1.5] - */ - nextIf = "NextIf", - /** - * Represents that the field type is NoteReference. - * @remarks - * [Api set: WordApi 1.5] - */ - noteRef = "NoteRef", - /** - * Represents that the field type is NumberOfCharacters. - * @remarks - * [Api set: WordApi 1.5] - */ - numChars = "NumChars", - /** - * Represents that the field type is NumberOfPages. - * @remarks - * [Api set: WordApi 1.5] - */ - numPages = "NumPages", - /** - * Represents that the field type is NumberOfWords. - * @remarks - * [Api set: WordApi 1.5] - */ - numWords = "NumWords", - /** - * Represents that the field type is ActiveXControl. - * @remarks - * [Api set: WordApi 1.5] - */ - ocx = "OCX", - /** - * Represents that the field type is Page. - * @remarks - * [Api set: WordApi 1.5] - */ - page = "Page", - /** - * Represents that the field type is PageReference. - * @remarks - * [Api set: WordApi 1.5] - */ - pageRef = "PageRef", - /** - * Represents that the field type is Print. - * @remarks - * [Api set: WordApi 1.5] - */ - print = "Print", - /** - * Represents that the field type is PrintDate. - * @remarks - * [Api set: WordApi 1.5] - */ - printDate = "PrintDate", - /** - * Represents that the field type is Private. - * @remarks - * [Api set: WordApi 1.5] - */ - private = "Private", - /** - * Represents that the field type is Quote. - * @remarks - * [Api set: WordApi 1.5] - */ - quote = "Quote", - /** - * Represents that the field type is ReferencedDocument. - * @remarks - * [Api set: WordApi 1.5] - */ - rd = "RD", - /** - * Represents that the field type is Reference. - * @remarks - * [Api set: WordApi 1.5] - */ - ref = "Ref", - /** - * Represents that the field type is RevisionNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - revNum = "RevNum", - /** - * Represents that the field type is SaveDate. - * @remarks - * [Api set: WordApi 1.5] - */ - saveDate = "SaveDate", - /** - * Represents that the field type is Section. - * @remarks - * [Api set: WordApi 1.5] - */ - section = "Section", - /** - * Represents that the field type is SectionPages. - * @remarks - * [Api set: WordApi 1.5] - */ - sectionPages = "SectionPages", - /** - * Represents that the field type is Sequence. - * @remarks - * [Api set: WordApi 1.5] - */ - seq = "Seq", - /** - * Represents that the field type is Set. - * @remarks - * [Api set: WordApi 1.5] - */ - set = "Set", - /** - * Represents that the field type is Shape. - * @remarks - * [Api set: WordApi 1.5] - */ - shape = "Shape", - /** - * Represents that the field type is SkipIf. - * @remarks - * [Api set: WordApi 1.5] - */ - skipIf = "SkipIf", - /** - * Represents that the field type is StyleReference. - * @remarks - * [Api set: WordApi 1.5] - */ - styleRef = "StyleRef", - /** - * Represents that the field type is Subject. - * @remarks - * [Api set: WordApi 1.5] - */ - subject = "Subject", - /** - * Represents that the field type is Subscriber. - * @remarks - * [Api set: WordApi 1.5] - */ - subscriber = "Subscriber", - /** - * Represents that the field type is Symbol. - * @remarks - * [Api set: WordApi 1.5] - */ - symbol = "Symbol", - /** - * Represents that the field type is TableOfAuthoritiesEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - ta = "TA", - /** - * Represents that the field type is TableOfContentsEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - tc = "TC", - /** - * Represents that the field type is Template. - * @remarks - * [Api set: WordApi 1.5] - */ - template = "Template", - /** - * Represents that the field type is Time. - * @remarks - * [Api set: WordApi 1.5] - */ - time = "Time", - /** - * Represents that the field type is Title. - * @remarks - * [Api set: WordApi 1.5] - */ - title = "Title", - /** - * Represents that the field type is TableOfAuthorities. - * @remarks - * [Api set: WordApi 1.5] - */ - toa = "TOA", - /** - * Represents that the field type is TableOfContents. - * @remarks - * [Api set: WordApi 1.5] - */ - toc = "TOC", - /** - * Represents that the field type is UserAddress. - * @remarks - * [Api set: WordApi 1.5] - */ - userAddress = "UserAddress", - /** - * Represents that the field type is UserInitials. - * @remarks - * [Api set: WordApi 1.5] - */ - userInitials = "UserInitials", - /** - * Represents that the field type is UserName. - * @remarks - * [Api set: WordApi 1.5] - */ - userName = "UserName", - /** - * Represents that the field type is IndexEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - xe = "XE", - /** - * Represents that the field type is Empty. - * @remarks - * [Api set: WordApi 1.5] - */ - empty = "Empty", - /** - * Represents the field types not supported by the Office JavaScript API. - * @remarks - * [Api set: WordApi 1.5] - */ - others = "Others", - /** - * Represents that the field type is Undefined. - * @remarks - * [Api set: WordApi 1.5] - */ - undefined = "Undefined", - } - /** - * Represents the kind of field. Indicates how the field works in relation to updating. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldKind { - /** - * Represents that the field is invalid. For example, a pair of field characters with nothing inside. - * @remarks - * [Api set: WordApi 1.5] - */ - none = "None", - /** - * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - hot = "Hot", - /** - * Represents that the field is automatically updated when the source changes or the field can be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - warm = "Warm", - /** - * Represents that the field doesn't have a result. - * @remarks - * [Api set: WordApi 1.5] - */ - cold = "Cold", - } - /** - * Represents the character inserted after the list item mark. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum TrailingCharacter { - /** - * A tab is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingTab = "TrailingTab", - /** - * A space is inserted. Default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingSpace = "TrailingSpace", - /** - * No character is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingNone = "TrailingNone", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ListBuiltInNumberStyle { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerLetter = "LowerLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinal = "Ordinal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - cardinalText = "CardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinalText = "OrdinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanji = "Kanji", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiDigit = "KanjiDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueoHalfWidth = "AiueoHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - irohaHalfWidth = "IrohaHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicFullWidth = "ArabicFullWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional = "KanjiTraditional", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional2 = "KanjiTraditional2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberInCircle = "NumberInCircle", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueo = "Aiueo", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - iroha = "Iroha", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ = "ArabicLZ", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ganada = "Ganada", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - chosung = "Chosung", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum1 = "GBNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum2 = "GBNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum3 = "GBNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum4 = "GBNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac1 = "Zodiac1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac2 = "Zodiac2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac3 = "Zodiac3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum1 = "TradChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum2 = "TradChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum3 = "TradChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum4 = "TradChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum1 = "SimpChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum2 = "SimpChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum3 = "SimpChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum4 = "SimpChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaRead = "HanjaRead", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaReadDigit = "HanjaReadDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hangul = "Hangul", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanja = "Hanja", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew1 = "Hebrew1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic1 = "Arabic1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew2 = "Hebrew2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic2 = "Arabic2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter1 = "HindiLetter1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter2 = "HindiLetter2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiArabic = "HindiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiCardinalText = "HindiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiLetter = "ThaiLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiArabic = "ThaiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiCardinalText = "ThaiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - vietCardinalText = "VietCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseRussian = "LowercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseRussian = "UppercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseGreek = "LowercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseGreek = "UppercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ2 = "ArabicLZ2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ3 = "ArabicLZ3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ4 = "ArabicLZ4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseTurkish = "LowercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseTurkish = "UppercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseBulgarian = "LowercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseBulgarian = "UppercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pictureBullet = "PictureBullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legal = "Legal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legalLZ = "LegalLZ", - } - /** - * Represents the shading texture. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ShadingTextureType { - /** - * Represents dark diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalDown = "DarkDiagonalDown", - /** - * Represents dark diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalUp = "DarkDiagonalUp", - /** - * Represents dark horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkGrid = "DarkGrid", - /** - * Represents dark horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkHorizontal = "DarkHorizontal", - /** - * Represents dark diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkTrellis = "DarkTrellis", - /** - * Represents dark vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkVertical = "DarkVertical", - /** - * Represents light diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalDown = "LightDiagonalDown", - /** - * Represents light diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalUp = "LightDiagonalUp", - /** - * Represents light horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightGrid = "LightGrid", - /** - * Represents light horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightHorizontal = "LightHorizontal", - /** - * Represents light diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightTrellis = "LightTrellis", - /** - * Represents light vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightVertical = "LightVertical", - /** - * Represents that there's no texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * Represents 10 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent10 = "Percent10", - /** - * Represents 12.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent12Pt5 = "Percent12Pt5", - /** - * Represents 15 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent15 = "Percent15", - /** - * Represents 20 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent20 = "Percent20", - /** - * Represents 25 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent25 = "Percent25", - /** - * Represents 30 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent30 = "Percent30", - /** - * Represents 35 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent35 = "Percent35", - /** - * Represents 37.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent37Pt5 = "Percent37Pt5", - /** - * Represents 40 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent40 = "Percent40", - /** - * Represents 45 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent45 = "Percent45", - /** - * Represents 5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent5 = "Percent5", - /** - * Represents 50 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent50 = "Percent50", - /** - * Represents 55 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent55 = "Percent55", - /** - * Represents 60 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent60 = "Percent60", - /** - * Represents 62.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent62Pt5 = "Percent62Pt5", - /** - * Represents 65 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent65 = "Percent65", - /** - * Represents 70 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent70 = "Percent70", - /** - * Represents 75 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent75 = "Percent75", - /** - * Represents 80 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent80 = "Percent80", - /** - * Represents 85 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent85 = "Percent85", - /** - * Represents 87.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent87Pt5 = "Percent87Pt5", - /** - * Represents 90 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent90 = "Percent90", - /** - * Represents 95 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent95 = "Percent95", - /** - * Represents solid texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - solid = "Solid", - } - /** - * Specifies the target document for displaying document comparison differences. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum CompareTarget { - /** - * Places comparison differences in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetCurrent = "CompareTargetCurrent", - /** - * Places comparison differences in the target document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetSelected = "CompareTargetSelected", - /** - * Places comparison differences in a new document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetNew = "CompareTargetNew", - } - /** - * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImportedStylesConflictBehavior { - /** - * Ignore conflicting imported styles and keep the existing version of those styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignore = "Ignore", - /** - * Overwrite the existing styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - overwrite = "Overwrite", - /** - * 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. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - createNew = "CreateNew", - } - /** - * Represents the shape type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeType { - /** - * Unsupported shape type. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - unsupported = "Unsupported", - /** - * Text box shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textBox = "TextBox", - /** - * Geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShape = "GeometricShape", - /** - * Group shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group = "Group", - /** - * Picture shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Canvas shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas = "Canvas", - } - /** - * Represents what the horizontal position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeHorizontalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to column. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - column = "Column", - /** - * Relative to character. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - character = "Character", - /** - * Relative to left margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin = "LeftMargin", - /** - * Relative to right margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin = "RightMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the vertical position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeVerticalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to paragraph. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - paragraph = "Paragraph", - /** - * Relative to line. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - line = "Line", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the horizontal or vertical size of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeSize { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Specifies the shape type for a `GeometricShape` object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum GeometricShapeType { - /** - * Line inverse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lineInverse = "LineInverse", - /** - * Triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - triangle = "Triangle", - /** - * Right triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightTriangle = "RightTriangle", - /** - * Rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rectangle = "Rectangle", - /** - * Diamond geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diamond = "Diamond", - /** - * Parallelogram geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parallelogram = "Parallelogram", - /** - * Trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - trapezoid = "Trapezoid", - /** - * Non-isosceles trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", - /** - * Pentagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pentagon = "Pentagon", - /** - * Hexagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hexagon = "Hexagon", - /** - * Heptagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heptagon = "Heptagon", - /** - * Octagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - octagon = "Octagon", - /** - * Decagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - decagon = "Decagon", - /** - * Dodecagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - dodecagon = "Dodecagon", - /** - * Star 4-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star4 = "Star4", - /** - * Star 5-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star5 = "Star5", - /** - * Star 6-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star6 = "Star6", - /** - * Star 7-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star7 = "Star7", - /** - * Star 8-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star8 = "Star8", - /** - * Star 10-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star10 = "Star10", - /** - * Star 12-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star12 = "Star12", - /** - * Star 16-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star16 = "Star16", - /** - * Star 24-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star24 = "Star24", - /** - * Star 32-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star32 = "Star32", - /** - * Round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - roundRectangle = "RoundRectangle", - /** - * Round one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round1Rectangle = "Round1Rectangle", - /** - * Round two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2SameRectangle = "Round2SameRectangle", - /** - * Round two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2DiagonalRectangle = "Round2DiagonalRectangle", - /** - * Snip round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snipRoundRectangle = "SnipRoundRectangle", - /** - * Snip one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip1Rectangle = "Snip1Rectangle", - /** - * Snip two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2SameRectangle = "Snip2SameRectangle", - /** - * Snip two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2DiagonalRectangle = "Snip2DiagonalRectangle", - /** - * Plaque geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaque = "Plaque", - /** - * Ellipse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipse = "Ellipse", - /** - * Teardrop geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - teardrop = "Teardrop", - /** - * Home plate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - homePlate = "HomePlate", - /** - * Chevron geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chevron = "Chevron", - /** - * Pie wedge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pieWedge = "PieWedge", - /** - * Pie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pie = "Pie", - /** - * Block arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - blockArc = "BlockArc", - /** - * Donut geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - donut = "Donut", - /** - * No smoking geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noSmoking = "NoSmoking", - /** - * Right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrow = "RightArrow", - /** - * Left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrow = "LeftArrow", - /** - * Up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrow = "UpArrow", - /** - * Down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrow = "DownArrow", - /** - * Striped right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - stripedRightArrow = "StripedRightArrow", - /** - * Notched right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - notchedRightArrow = "NotchedRightArrow", - /** - * Bent up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentUpArrow = "BentUpArrow", - /** - * Left-right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrow = "LeftRightArrow", - /** - * Up-down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrow = "UpDownArrow", - /** - * Left-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftUpArrow = "LeftUpArrow", - /** - * Left-right-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightUpArrow = "LeftRightUpArrow", - /** - * Quad arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrow = "QuadArrow", - /** - * Left arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrowCallout = "LeftArrowCallout", - /** - * Right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrowCallout = "RightArrowCallout", - /** - * Up arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrowCallout = "UpArrowCallout", - /** - * Down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrowCallout = "DownArrowCallout", - /** - * Left-right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrowCallout = "LeftRightArrowCallout", - /** - * Up-down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrowCallout = "UpDownArrowCallout", - /** - * Quad arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrowCallout = "QuadArrowCallout", - /** - * Bent arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentArrow = "BentArrow", - /** - * U-turn arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - uturnArrow = "UturnArrow", - /** - * Circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - circularArrow = "CircularArrow", - /** - * Left circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftCircularArrow = "LeftCircularArrow", - /** - * Left-right circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightCircularArrow = "LeftRightCircularArrow", - /** - * Curved right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedRightArrow = "CurvedRightArrow", - /** - * Curved left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedLeftArrow = "CurvedLeftArrow", - /** - * Curved up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedUpArrow = "CurvedUpArrow", - /** - * Curved down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedDownArrow = "CurvedDownArrow", - /** - * Swoosh arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - swooshArrow = "SwooshArrow", - /** - * Cube geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cube = "Cube", - /** - * Can geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - can = "Can", - /** - * Lightning bolt geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lightningBolt = "LightningBolt", - /** - * Heart geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heart = "Heart", - /** - * Sun geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - sun = "Sun", - /** - * Moon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - moon = "Moon", - /** - * Smiley face geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - smileyFace = "SmileyFace", - /** - * Irregular seal 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal1 = "IrregularSeal1", - /** - * Irregular seal 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal2 = "IrregularSeal2", - /** - * Folded corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foldedCorner = "FoldedCorner", - /** - * Bevel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bevel = "Bevel", - /** - * Frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - frame = "Frame", - /** - * Half frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - halfFrame = "HalfFrame", - /** - * Corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - corner = "Corner", - /** - * Diagonal stripe geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diagonalStripe = "DiagonalStripe", - /** - * Chord geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chord = "Chord", - /** - * Arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - arc = "Arc", - /** - * Left bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBracket = "LeftBracket", - /** - * Right bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBracket = "RightBracket", - /** - * Left brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBrace = "LeftBrace", - /** - * Right brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBrace = "RightBrace", - /** - * Bracket pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracketPair = "BracketPair", - /** - * Brace pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracePair = "BracePair", - /** - * Callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout1 = "Callout1", - /** - * Callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout2 = "Callout2", - /** - * Callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout3 = "Callout3", - /** - * Accent callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout1 = "AccentCallout1", - /** - * Accent callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout2 = "AccentCallout2", - /** - * Accent callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout3 = "AccentCallout3", - /** - * Border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout1 = "BorderCallout1", - /** - * Border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout2 = "BorderCallout2", - /** - * Border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout3 = "BorderCallout3", - /** - * Accent border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout1 = "AccentBorderCallout1", - /** - * Accent border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout2 = "AccentBorderCallout2", - /** - * Accent border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout3 = "AccentBorderCallout3", - /** - * Wedge rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRectCallout = "WedgeRectCallout", - /** - * Wedge rounded rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRRectCallout = "WedgeRRectCallout", - /** - * Wedge ellipse callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeEllipseCallout = "WedgeEllipseCallout", - /** - * Cloud callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloudCallout = "CloudCallout", - /** - * Cloud geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloud = "Cloud", - /** - * Ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon = "Ribbon", - /** - * Ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon2 = "Ribbon2", - /** - * Ellipse ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon = "EllipseRibbon", - /** - * Ellipse ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon2 = "EllipseRibbon2", - /** - * Left-right ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightRibbon = "LeftRightRibbon", - /** - * Vertical scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalScroll = "VerticalScroll", - /** - * Horizontal scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontalScroll = "HorizontalScroll", - /** - * Wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wave = "Wave", - /** - * Double wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - doubleWave = "DoubleWave", - /** - * Plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plus = "Plus", - /** - * Flow chart process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartProcess = "FlowChartProcess", - /** - * Flow chart decision geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDecision = "FlowChartDecision", - /** - * Flow chart input-output geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInputOutput = "FlowChartInputOutput", - /** - * Flow chart predefined process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPredefinedProcess = "FlowChartPredefinedProcess", - /** - * Flow chart internal storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInternalStorage = "FlowChartInternalStorage", - /** - * Flow chart document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDocument = "FlowChartDocument", - /** - * Flow chart multidocument geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMultidocument = "FlowChartMultidocument", - /** - * Flow chart terminator geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartTerminator = "FlowChartTerminator", - /** - * Flow chart preparation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPreparation = "FlowChartPreparation", - /** - * Flow chart manual input geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualInput = "FlowChartManualInput", - /** - * Flow chart manual operation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualOperation = "FlowChartManualOperation", - /** - * Flow chart connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartConnector = "FlowChartConnector", - /** - * Flow chart punched card geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedCard = "FlowChartPunchedCard", - /** - * Flow chart punched tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedTape = "FlowChartPunchedTape", - /** - * Flow chart summing junction geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSummingJunction = "FlowChartSummingJunction", - /** - * Flow chart OR geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOr = "FlowChartOr", - /** - * Flow chart collate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartCollate = "FlowChartCollate", - /** - * Flow chart sort geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSort = "FlowChartSort", - /** - * Flow chart extract geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartExtract = "FlowChartExtract", - /** - * Flow chart merge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMerge = "FlowChartMerge", - /** - * Flow chart offline storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOfflineStorage = "FlowChartOfflineStorage", - /** - * Flow chart online storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOnlineStorage = "FlowChartOnlineStorage", - /** - * Flow chart magnetic tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticTape = "FlowChartMagneticTape", - /** - * Flow chart magnetic disk geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDisk = "FlowChartMagneticDisk", - /** - * Flow chart magnetic drum geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDrum = "FlowChartMagneticDrum", - /** - * Flow chart display geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDisplay = "FlowChartDisplay", - /** - * Flow chart delay geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDelay = "FlowChartDelay", - /** - * Flow chart alternate process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartAlternateProcess = "FlowChartAlternateProcess", - /** - * Flow chart off-page connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOffpageConnector = "FlowChartOffpageConnector", - /** - * Action button blank geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBlank = "ActionButtonBlank", - /** - * Action button home geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHome = "ActionButtonHome", - /** - * Action button help geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHelp = "ActionButtonHelp", - /** - * Action button information geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonInformation = "ActionButtonInformation", - /** - * Action button forward next geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonForwardNext = "ActionButtonForwardNext", - /** - * Action button back previous geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBackPrevious = "ActionButtonBackPrevious", - /** - * Action button end geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonEnd = "ActionButtonEnd", - /** - * Action button beginning geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBeginning = "ActionButtonBeginning", - /** - * Action button return geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonReturn = "ActionButtonReturn", - /** - * Action button document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonDocument = "ActionButtonDocument", - /** - * Action button sound geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonSound = "ActionButtonSound", - /** - * Action button movie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonMovie = "ActionButtonMovie", - /** - * Gear 6 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear6 = "Gear6", - /** - * Gear 9 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear9 = "Gear9", - /** - * Funnel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - funnel = "Funnel", - /** - * Math plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathPlus = "MathPlus", - /** - * Math minus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMinus = "MathMinus", - /** - * Math multiply geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMultiply = "MathMultiply", - /** - * Math divide geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathDivide = "MathDivide", - /** - * Math equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathEqual = "MathEqual", - /** - * Math not equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathNotEqual = "MathNotEqual", - /** - * Corner tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cornerTabs = "CornerTabs", - /** - * Square tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - squareTabs = "SquareTabs", - /** - * Plaque tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaqueTabs = "PlaqueTabs", - /** - * Chart X geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartX = "ChartX", - /** - * Chart star geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartStar = "ChartStar", - /** - * Chart plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartPlus = "ChartPlus", - } - /** - * Specifies a shape's fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeFillType { - /** - * No fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noFill = "NoFill", - /** - * Solid fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - solid = "Solid", - /** - * Gradient fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gradient = "Gradient", - /** - * Pattern fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pattern = "Pattern", - /** - * Picture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Texture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - texture = "Texture", - /** - * Mixed fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies the vertical alignment for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextVerticalAlignment { - /** - * Anchor the text at the top of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top = "Top", - /** - * Anchor the text at the middle of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - middle = "Middle", - /** - * Anchor the text at the bottom of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottom = "Bottom", - } - /** - * Specifies the orientation for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextOrientation { - /** - * No orientation, such as in a new geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Horizontal text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontal = "Horizontal", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianVertical = "EastAsianVertical", - /** - * Determines if all of the text is vertical orientation (each line is 270 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical270 = "Vertical270", - /** - * Determines if all of the text is vertical orientation (each line is 90 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical = "Vertical", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianHorizontalRotated = "EastAsianHorizontalRotated", - /** - * A combination of automatic orientation is used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Determines the type of automatic sizing allowed. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeAutoSize { - /** - * No autosizing. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * The text is adjusted to fit the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textToFitShape = "TextToFitShape", - /** - * The shape is adjusted to fit the text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeToFitText = "ShapeToFitText", - /** - * A combination of automatic sizing schemes are used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies how to wrap document text around a shape. For more details, see the "Text Wrapping" tab of {@link https://support.microsoft.com/office/a0f53857-b501-46c6-ba8b-68ba51e0e3cc | Layout options}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapType { - /** - * Places the shape in line with text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - inline = "Inline", - /** - * Wraps text squarely around the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - square = "Square", - /** - * Wraps text close to the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - tight = "Tight", - /** - * Wraps text around and through the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - through = "Through", - /** - * Places text above and below the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topBottom = "TopBottom", - /** - * Places shape behind text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - behind = "Behind", - /** - * Places shape in front of text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - front = "Front", - } - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farther from the respective page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapSide { - /** - * Has no wrap side property, such as those for inline shapes. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Both left and right sides of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - both = "Both", - /** - * Left side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left = "Left", - /** - * Right side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - right = "Right", - /** - * Side of the shape that's farther from the respective page margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - largest = "Largest", - } - /** - * Specifies the scale size type of a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleType { - /** - * Scale from current size of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - currentSize = "CurrentSize", - /** - * Scale from original size of the shape. It only works for pictures. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - originalSize = "OriginalSize", - } - /** - * Specifies which part of the shape retains its position when the shape is scaled. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleFrom { - /** - * Scale from the top left corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromTopLeft = "ScaleFromTopLeft", - /** - * Scale from the center of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromMiddle = "ScaleFromMiddle", - /** - * Scale from the bottom right corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromBottomRight = "ScaleFromBottomRight", - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum ErrorCodes { - accessDenied = "AccessDenied", - generalException = "GeneralException", - invalidArgument = "InvalidArgument", - itemNotFound = "ItemNotFound", - notAllowed = "NotAllowed", - notImplemented = "NotImplemented", - searchDialogIsOpen = "SearchDialogIsOpen", - searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", - } - export namespace Interfaces { - /** - * Provides ways to load properties of only a subset of members of a collection. - */ - export interface CollectionLoadOptions { - /** - * Specify the number of items in the queried collection to be included in the result. - */ - $top?: number; - /** - * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. - */ - $skip?: number; - } - /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ - export interface AnnotationCollectionUpdateData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface for updating data on the `Application` object, for use in `application.set({ ... })`. */ - export interface ApplicationUpdateData { - - - } - /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ - export interface BodyUpdateData { - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ - export interface BorderUpdateData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface for updating data on the `BorderUniversal` object, for use in `borderUniversal.set({ ... })`. */ - export interface BorderUniversalUpdateData { - - - - - - - - } - /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ - export interface BorderCollectionUpdateData { - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor?: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor?: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - items?: Word.Interfaces.BorderData[]; - } - /** An interface for updating data on the `BorderUniversalCollection` object, for use in `borderUniversalCollection.set({ ... })`. */ - export interface BorderUniversalCollectionUpdateData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface for updating data on the `Break` object, for use in `break.set({ ... })`. */ - export interface BreakUpdateData { - - } - /** An interface for updating data on the `BreakCollection` object, for use in `breakCollection.set({ ... })`. */ - export interface BreakCollectionUpdateData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface for updating data on the `BuildingBlock` object, for use in `buildingBlock.set({ ... })`. */ - export interface BuildingBlockUpdateData { - - - - - } - /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ - export interface CheckboxContentControlUpdateData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ - export interface CommentUpdateData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ - export interface CommentCollectionUpdateData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ - export interface CommentContentRangeUpdateData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`. */ - export interface CommentReplyUpdateData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentUpdateData; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - } - /** An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... })`. */ - export interface CommentReplyCollectionUpdateData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface for updating data on the `XmlMapping` object, for use in `xmlMapping.set({ ... })`. */ - export interface XmlMappingUpdateData { - - - } - /** An interface for updating data on the `CustomXmlPrefixMappingCollection` object, for use in `customXmlPrefixMappingCollection.set({ ... })`. */ - export interface CustomXmlPrefixMappingCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface for updating data on the `CustomXmlSchemaCollection` object, for use in `customXmlSchemaCollection.set({ ... })`. */ - export interface CustomXmlSchemaCollectionUpdateData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface for updating data on the `CustomXmlNodeCollection` object, for use in `customXmlNodeCollection.set({ ... })`. */ - export interface CustomXmlNodeCollectionUpdateData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface for updating data on the `CustomXmlNode` object, for use in `customXmlNode.set({ ... })`. */ - export interface CustomXmlNodeUpdateData { - - - - - - - - - } - /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ - export interface ContentControlUpdateData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - } - /** An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ ... })`. */ - export interface ContentControlCollectionUpdateData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ - export interface ContentControlListItemUpdateData { - - - - } - /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ - export interface ContentControlListItemCollectionUpdateData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ - export interface CustomPropertyUpdateData { - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ ... })`. */ - export interface CustomPropertyCollectionUpdateData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface for updating data on the `CustomXmlPart` object, for use in `customXmlPart.set({ ... })`. */ - export interface CustomXmlPartUpdateData { - - } - /** An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... })`. */ - export interface CustomXmlPartCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in `customXmlPartScopedCollection.set({ ... })`. */ - export interface CustomXmlPartScopedCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `Document` object, for use in `document.set({ ... })`. */ - export interface DocumentUpdateData { - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - } - /** An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`. */ - export interface DocumentCreatedUpdateData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - } - /** An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. */ - export interface DocumentPropertiesUpdateData { - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface for updating data on the `Field` object, for use in `field.set({ ... })`. */ - export interface FieldUpdateData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeUpdateData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - } - /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ - export interface FieldCollectionUpdateData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface for updating data on the `Font` object, for use in `font.set({ ... })`. */ - export interface FontUpdateData { - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface for updating data on the `Hyperlink` object, for use in `hyperlink.set({ ... })`. */ - export interface HyperlinkUpdateData { - - - - - - - - } - /** An interface for updating data on the `HyperlinkCollection` object, for use in `hyperlinkCollection.set({ ... })`. */ - export interface HyperlinkCollectionUpdateData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`. */ - export interface InlinePictureUpdateData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... })`. */ - export interface InlinePictureCollectionUpdateData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`. */ - export interface ListCollectionUpdateData { - items?: Word.Interfaces.ListData[]; - } - /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ - export interface ListItemUpdateData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - } - /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ - export interface ListLevelUpdateData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ - export interface ListLevelCollectionUpdateData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ - export interface ListTemplateUpdateData { - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ - export interface NoteItemUpdateData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeUpdateData; - } - /** An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. */ - export interface NoteItemCollectionUpdateData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface for updating data on the `PageCollection` object, for use in `pageCollection.set({ ... })`. */ - export interface PageCollectionUpdateData { - items?: Word.Interfaces.PageData[]; - } - /** An interface for updating data on the `PaneCollection` object, for use in `paneCollection.set({ ... })`. */ - export interface PaneCollectionUpdateData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface for updating data on the `WindowCollection` object, for use in `windowCollection.set({ ... })`. */ - export interface WindowCollectionUpdateData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`. */ - export interface ParagraphUpdateData { - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemUpdateData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. */ - export interface ParagraphCollectionUpdateData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`. */ - export interface ParagraphFormatUpdateData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface for updating data on the `Range` object, for use in `range.set({ ... })`. */ - export interface RangeUpdateData { - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`. */ - export interface RangeCollectionUpdateData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`. */ - export interface SearchOptionsUpdateData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface for updating data on the `Section` object, for use in `section.set({ ... })`. */ - export interface SectionUpdateData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - - } - /** An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`. */ - export interface SectionCollectionUpdateData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`. */ - export interface SettingUpdateData { - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`. */ - export interface SettingCollectionUpdateData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`. */ - export interface StyleCollectionUpdateData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ - export interface StyleUpdateData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionUpdateData; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontUpdateData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateUpdateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingUpdateData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleUpdateData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - - - - - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`. */ - export interface ShadingUpdateData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface for updating data on the `ShadingUniversal` object, for use in `shadingUniversal.set({ ... })`. */ - export interface ShadingUniversalUpdateData { - - - - - - } - /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ - export interface TableUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ - export interface TableStyleUpdateData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`. */ - export interface TableCollectionUpdateData { - items?: Word.Interfaces.TableData[]; - } - /** An interface for updating data on the `TableColumn` object, for use in `tableColumn.set({ ... })`. */ - export interface TableColumnUpdateData { - - - - - } - /** An interface for updating data on the `TableColumnCollection` object, for use in `tableColumnCollection.set({ ... })`. */ - export interface TableColumnCollectionUpdateData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`. */ - export interface TableRowUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. */ - export interface TableRowCollectionUpdateData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`. */ - export interface TableCellUpdateData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. */ - export interface TableCellCollectionUpdateData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`. */ - export interface TableBorderUpdateData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `Template` object, for use in `template.set({ ... })`. */ - export interface TemplateUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `TemplateCollection` object, for use in `templateCollection.set({ ... })`. */ - export interface TemplateCollectionUpdateData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... })`. */ - export interface TrackedChangeCollectionUpdateData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface for updating data on the `Shape` object, for use in `shape.set({ ... })`. */ - export interface ShapeUpdateData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasUpdateData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillUpdateData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupUpdateData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameUpdateData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapUpdateData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface for updating data on the `ShapeGroup` object, for use in `shapeGroup.set({ ... })`. */ - export interface ShapeGroupUpdateData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `Canvas` object, for use in `canvas.set({ ... })`. */ - export interface CanvasUpdateData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `ShapeCollection` object, for use in `shapeCollection.set({ ... })`. */ - export interface ShapeCollectionUpdateData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface for updating data on the `ShapeFill` object, for use in `shapeFill.set({ ... })`. */ - export interface ShapeFillUpdateData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - } - /** An interface for updating data on the `TextFrame` object, for use in `textFrame.set({ ... })`. */ - export interface TextFrameUpdateData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface for updating data on the `ShapeTextWrap` object, for use in `shapeTextWrap.set({ ... })`. */ - export interface ShapeTextWrapUpdateData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface for updating data on the `RepeatingSectionItem` object, for use in `repeatingSectionItem.set({ ... })`. */ - export interface RepeatingSectionItemUpdateData { - - } - /** An interface for updating data on the `DatePickerContentControl` object, for use in `datePickerContentControl.set({ ... })`. */ - export interface DatePickerContentControlUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `PictureContentControl` object, for use in `pictureContentControl.set({ ... })`. */ - export interface PictureContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `GroupContentControl` object, for use in `groupContentControl.set({ ... })`. */ - export interface GroupContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `BuildingBlockGalleryContentControl` object, for use in `buildingBlockGalleryContentControl.set({ ... })`. */ - export interface BuildingBlockGalleryContentControlUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `RepeatingSectionContentControl` object, for use in `repeatingSectionContentControl.set({ ... })`. */ - export interface RepeatingSectionContentControlUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `Frame` object, for use in `frame.set({ ... })`. */ - export interface FrameUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `FrameCollection` object, for use in `frameCollection.set({ ... })`. */ - export interface FrameCollectionUpdateData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface for updating data on the `DocumentLibraryVersionCollection` object, for use in `documentLibraryVersionCollection.set({ ... })`. */ - export interface DocumentLibraryVersionCollectionUpdateData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface for updating data on the `ListFormat` object, for use in `listFormat.set({ ... })`. */ - export interface ListFormatUpdateData { - - - } - /** An interface for updating data on the `FillFormat` object, for use in `fillFormat.set({ ... })`. */ - export interface FillFormatUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `GlowFormat` object, for use in `glowFormat.set({ ... })`. */ - export interface GlowFormatUpdateData { - - - - } - /** An interface for updating data on the `LineFormat` object, for use in `lineFormat.set({ ... })`. */ - export interface LineFormatUpdateData { - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `ReflectionFormat` object, for use in `reflectionFormat.set({ ... })`. */ - export interface ReflectionFormatUpdateData { - - - - - - } - /** An interface for updating data on the `ColorFormat` object, for use in `colorFormat.set({ ... })`. */ - export interface ColorFormatUpdateData { - - - - - } - /** An interface for updating data on the `ShadowFormat` object, for use in `shadowFormat.set({ ... })`. */ - export interface ShadowFormatUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `ThreeDimensionalFormat` object, for use in `threeDimensionalFormat.set({ ... })`. */ - export interface ThreeDimensionalFormatUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `Bibliography` object, for use in `bibliography.set({ ... })`. */ - export interface BibliographyUpdateData { - - } - /** An interface for updating data on the `SourceCollection` object, for use in `sourceCollection.set({ ... })`. */ - export interface SourceCollectionUpdateData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface for updating data on the `PageSetup` object, for use in `pageSetup.set({ ... })`. */ - export interface PageSetupUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `LineNumbering` object, for use in `lineNumbering.set({ ... })`. */ - export interface LineNumberingUpdateData { - - - - - - } - /** An interface for updating data on the `TextColumnCollection` object, for use in `textColumnCollection.set({ ... })`. */ - export interface TextColumnCollectionUpdateData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface for updating data on the `TextColumn` object, for use in `textColumn.set({ ... })`. */ - export interface TextColumnUpdateData { - - - } - /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ - export interface CritiqueAnnotationData { - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: Word.Critique; - } - /** An interface describing the data returned by calling `annotation.toJSON()`. */ - export interface AnnotationData { - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - } - /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ - export interface AnnotationCollectionData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface describing the data returned by calling `application.toJSON()`. */ - export interface ApplicationData { - - - - } - /** An interface describing the data returned by calling `body.toJSON()`. */ - export interface BodyData { - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - } - /** An interface describing the data returned by calling `border.toJSON()`. */ - export interface BorderData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface describing the data returned by calling `borderUniversal.toJSON()`. */ - export interface BorderUniversalData { - - - - - - - - - } - /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ - export interface BorderCollectionData { - items?: Word.Interfaces.BorderData[]; - } - /** An interface describing the data returned by calling `borderUniversalCollection.toJSON()`. */ - export interface BorderUniversalCollectionData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface describing the data returned by calling `break.toJSON()`. */ - export interface BreakData { - - - } - /** An interface describing the data returned by calling `breakCollection.toJSON()`. */ - export interface BreakCollectionData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface describing the data returned by calling `buildingBlock.toJSON()`. */ - export interface BuildingBlockData { - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockCategory.toJSON()`. */ - export interface BuildingBlockCategoryData { - - - } - /** An interface describing the data returned by calling `buildingBlockTypeItem.toJSON()`. */ - export interface BuildingBlockTypeItemData { - - - } - /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ - export interface CheckboxContentControlData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface describing the data returned by calling `comment.toJSON()`. */ - export interface CommentData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - replies?: Word.Interfaces.CommentReplyData[]; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ - export interface CommentCollectionData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ - export interface CommentContentRangeData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface describing the data returned by calling `commentReply.toJSON()`. */ - export interface CommentReplyData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentData; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - } - /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ - export interface CommentReplyCollectionData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface describing the data returned by calling `xmlMapping.toJSON()`. */ - export interface XmlMappingData { - - - - - - } - /** An interface describing the data returned by calling `customXmlPrefixMappingCollection.toJSON()`. */ - export interface CustomXmlPrefixMappingCollectionData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface describing the data returned by calling `customXmlPrefixMapping.toJSON()`. */ - export interface CustomXmlPrefixMappingData { - - - } - /** An interface describing the data returned by calling `customXmlSchema.toJSON()`. */ - export interface CustomXmlSchemaData { - - - } - /** An interface describing the data returned by calling `customXmlSchemaCollection.toJSON()`. */ - export interface CustomXmlSchemaCollectionData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface describing the data returned by calling `customXmlNodeCollection.toJSON()`. */ - export interface CustomXmlNodeCollectionData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface describing the data returned by calling `customXmlNode.toJSON()`. */ - export interface CustomXmlNodeData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `contentControl.toJSON()`. */ - export interface ContentControlData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; - - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - - - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - } - /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ - export interface ContentControlCollectionData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ - export interface ContentControlListItemData { - - - - } - /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ - export interface ContentControlListItemCollectionData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface describing the data returned by calling `customProperty.toJSON()`. */ - export interface CustomPropertyData { - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ - export interface CustomPropertyCollectionData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ - export interface CustomXmlPartData { - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: string; - - } - /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ - export interface CustomXmlPartCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ - export interface CustomXmlPartScopedCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `document.toJSON()`. */ - export interface DocumentData { - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - activeWindow?: Word.Interfaces.WindowData; - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - windows?: Word.Interfaces.WindowData[]; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ - export interface DocumentCreatedData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ - export interface DocumentPropertiesData { - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - customProperties?: Word.Interfaces.CustomPropertyData[]; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ - export interface DropDownListContentControlData { - } - /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ - export interface ComboBoxContentControlData { - } - /** An interface describing the data returned by calling `field.toJSON()`. */ - export interface FieldData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - } - /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ - export interface FieldCollectionData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface describing the data returned by calling `font.toJSON()`. */ - export interface FontData { - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface describing the data returned by calling `hyperlink.toJSON()`. */ - export interface HyperlinkData { - - - - - - - - - - - } - /** An interface describing the data returned by calling `hyperlinkCollection.toJSON()`. */ - export interface HyperlinkCollectionData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ - export interface InlinePictureData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ - export interface InlinePictureCollectionData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface describing the data returned by calling `list.toJSON()`. */ - export interface ListData { - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: Word.ListLevelType[]; - } - /** An interface describing the data returned by calling `listCollection.toJSON()`. */ - export interface ListCollectionData { - items?: Word.Interfaces.ListData[]; - } - /** An interface describing the data returned by calling `listItem.toJSON()`. */ - export interface ListItemData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: number; - } - /** An interface describing the data returned by calling `listLevel.toJSON()`. */ - export interface ListLevelData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ - export interface ListLevelCollectionData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ - export interface ListTemplateData { - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listLevels?: Word.Interfaces.ListLevelData[]; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface describing the data returned by calling `noteItem.toJSON()`. */ - export interface NoteItemData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeData; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.NoteItemType | "Footnote" | "Endnote"; - } - /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ - export interface NoteItemCollectionData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface describing the data returned by calling `page.toJSON()`. */ - export interface PageData { - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** An interface describing the data returned by calling `pageCollection.toJSON()`. */ - export interface PageCollectionData { - items?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `pane.toJSON()`. */ - export interface PaneData { - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pagesEnclosingViewport?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `paneCollection.toJSON()`. */ - export interface PaneCollectionData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface describing the data returned by calling `window.toJSON()`. */ - export interface WindowData { - } - /** An interface describing the data returned by calling `windowCollection.toJSON()`. */ - export interface WindowCollectionData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface describing the data returned by calling `paragraph.toJSON()`. */ - export interface ParagraphData { - - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemData; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: string; - } - /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ - export interface ParagraphCollectionData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ - export interface ParagraphFormatData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface describing the data returned by calling `range.toJSON()`. */ - export interface RangeData { - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - } - /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ - export interface RangeCollectionData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ - export interface SearchOptionsData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface describing the data returned by calling `section.toJSON()`. */ - export interface SectionData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - - - - } - /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ - export interface SectionCollectionData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface describing the data returned by calling `setting.toJSON()`. */ - export interface SettingData { - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ - export interface SettingCollectionData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ - export interface StyleCollectionData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface describing the data returned by calling `style.toJSON()`. */ - export interface StyleData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderData[]; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface describing the data returned by calling `shading.toJSON()`. */ - export interface ShadingData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface describing the data returned by calling `shadingUniversal.toJSON()`. */ - export interface ShadingUniversalData { - - - - - - } - /** An interface describing the data returned by calling `table.toJSON()`. */ - export interface TableData { - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rows?: Word.Interfaces.TableRowData[]; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ - export interface TableStyleData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ - export interface TableCollectionData { - items?: Word.Interfaces.TableData[]; - } - /** An interface describing the data returned by calling `tableColumn.toJSON()`. */ - export interface TableColumnData { - - - - - - - - - - } - /** An interface describing the data returned by calling `tableColumnCollection.toJSON()`. */ - export interface TableColumnCollectionData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface describing the data returned by calling `tableRow.toJSON()`. */ - export interface TableRowData { - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cells?: Word.Interfaces.TableCellData[]; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ - export interface TableRowCollectionData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface describing the data returned by calling `tableCell.toJSON()`. */ - export interface TableCellData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ - export interface TableCellCollectionData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ - export interface TableBorderData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `template.toJSON()`. */ - export interface TemplateData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `templateCollection.toJSON()`. */ - export interface TemplateCollectionData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ - export interface TrackedChangeData { - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - } - /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ - export interface TrackedChangeCollectionData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface describing the data returned by calling `shape.toJSON()`. */ - export interface ShapeData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ - export interface ShapeGroupData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `canvas.toJSON()`. */ - export interface CanvasData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ - export interface ShapeCollectionData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ - export interface ShapeFillData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - } - /** An interface describing the data returned by calling `textFrame.toJSON()`. */ - export interface TextFrameData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface describing the data returned by calling `shapeTextWrap.toJSON()`. */ - export interface ShapeTextWrapData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface describing the data returned by calling `repeatingSectionItem.toJSON()`. */ - export interface RepeatingSectionItemData { - - } - /** An interface describing the data returned by calling `datePickerContentControl.toJSON()`. */ - export interface DatePickerContentControlData { - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `pictureContentControl.toJSON()`. */ - export interface PictureContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `groupContentControl.toJSON()`. */ - export interface GroupContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockGalleryContentControl.toJSON()`. */ - export interface BuildingBlockGalleryContentControlData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `repeatingSectionContentControl.toJSON()`. */ - export interface RepeatingSectionContentControlData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frame.toJSON()`. */ - export interface FrameData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frameCollection.toJSON()`. */ - export interface FrameCollectionData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface describing the data returned by calling `documentLibraryVersion.toJSON()`. */ - export interface DocumentLibraryVersionData { - - - - } - /** An interface describing the data returned by calling `documentLibraryVersionCollection.toJSON()`. */ - export interface DocumentLibraryVersionCollectionData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface describing the data returned by calling `listFormat.toJSON()`. */ - export interface ListFormatData { - - - - - - - - - } - /** An interface describing the data returned by calling `fillFormat.toJSON()`. */ - export interface FillFormatData { - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `glowFormat.toJSON()`. */ - export interface GlowFormatData { - - - - } - /** An interface describing the data returned by calling `lineFormat.toJSON()`. */ - export interface LineFormatData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `reflectionFormat.toJSON()`. */ - export interface ReflectionFormatData { - - - - - - } - /** An interface describing the data returned by calling `colorFormat.toJSON()`. */ - export interface ColorFormatData { - - - - - - } - /** An interface describing the data returned by calling `shadowFormat.toJSON()`. */ - export interface ShadowFormatData { - - - - - - - - - - - - } - /** An interface describing the data returned by calling `threeDimensionalFormat.toJSON()`. */ - export interface ThreeDimensionalFormatData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `bibliography.toJSON()`. */ - export interface BibliographyData { - - - } - /** An interface describing the data returned by calling `sourceCollection.toJSON()`. */ - export interface SourceCollectionData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface describing the data returned by calling `source.toJSON()`. */ - export interface SourceData { - - - - } - /** An interface describing the data returned by calling `pageSetup.toJSON()`. */ - export interface PageSetupData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `lineNumbering.toJSON()`. */ - export interface LineNumberingData { - - - - - - } - /** An interface describing the data returned by calling `textColumnCollection.toJSON()`. */ - export interface TextColumnCollectionData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface describing the data returned by calling `textColumn.toJSON()`. */ - export interface TextColumnData { - - - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CritiqueAnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - range?: Word.Interfaces.RangeLoadOptions; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: boolean; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ApplicationLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface BodyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSection?: Word.Interfaces.SectionLoadOptions; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * For EACH ITEM in the collection: Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CheckboxContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentContentRangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: boolean; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * For EACH ITEM in the collection: Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * For EACH ITEM in the collection: Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - - - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartScopedCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface DocumentLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: boolean; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentCreatedLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentPropertiesLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: boolean; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: boolean; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: boolean; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: boolean; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: boolean; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: boolean; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: boolean; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: boolean; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: boolean; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: boolean; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: boolean; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: boolean; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: boolean; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: boolean; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: boolean; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: boolean; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: boolean; - } - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface FontLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: boolean; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: boolean; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: boolean; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: boolean; - - } - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: boolean; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: boolean; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: boolean; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListTemplateLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * For EACH ITEM in the collection: Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ParagraphFormatLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: boolean; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: boolean; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: boolean; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: boolean; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: boolean; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SearchOptionsLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface StyleCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * For EACH ITEM in the collection: Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface StyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ShadingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: boolean; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: boolean; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: boolean; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TableStyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: boolean; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: boolean; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: boolean; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * For EACH ITEM in the collection: Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableBorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: boolean; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * For EACH ITEM in the collection: Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeGroupLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface CanvasLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * For EACH ITEM in the collection: Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * For EACH ITEM in the collection: Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * For EACH ITEM in the collection: Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * For EACH ITEM in the collection: Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * For EACH ITEM in the collection: The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * For EACH ITEM in the collection: The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * For EACH ITEM in the collection: The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeFillLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: boolean; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: boolean; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: boolean; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface TextFrameLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: boolean; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: boolean; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: boolean; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: boolean; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: boolean; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: boolean; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: boolean; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeTextWrapLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: boolean; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: boolean; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: boolean; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - - - - - - - - - - - - - - - - - - - - - - - - - - } -} -export declare namespace Word { - /** - * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. - */ - export class RequestContext extends OfficeExtension.ClientRequestContext { - constructor(url?: string); - readonly document: Document; - /** [Api set: WordApi 1.3] **/ - readonly application: Application; - } - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. - * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(batch: (context: Word.RequestContext) => Promise): Promise; -} - - -//////////////////////////////////////////////////////////////// -//////////////////////// End Word APIs ///////////////////////// -//////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop4.d.ts b/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop4.d.ts deleted file mode 100644 index 5429b146d9..0000000000 --- a/generate-docs/api-extractor-inputs-word-release/word_desktop_1_2/word-desktop4.d.ts +++ /dev/null @@ -1,27033 +0,0 @@ -import { OfficeExtension } from "../../api-extractor-inputs-office/office" -import { Office as Outlook} from "../../api-extractor-inputs-outlook/outlook" -//////////////////////////////////////////////////////////////// -/////////////////////// Begin Word APIs //////////////////////// -//////////////////////////////////////////////////////////////// - -export declare namespace Word { - /** - * Represents the color scheme of a critique in the document, affecting underline and highlight. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum CritiqueColorScheme { - /** - * Red color. - * @remarks - * [Api set: WordApi 1.7] - */ - red = "Red", - /** - * Green color. - * @remarks - * [Api set: WordApi 1.7] - */ - green = "Green", - /** - * Blue color. - * @remarks - * [Api set: WordApi 1.7] - */ - blue = "Blue", - /** - * Lavender color. - * @remarks - * [Api set: WordApi 1.7] - */ - lavender = "Lavender", - /** - * Berry color. - * @remarks - * [Api set: WordApi 1.7] - */ - berry = "Berry", - } - /** - * Properties defining the behavior of the pop-up menu for a given critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface CritiquePopupOptions { - /** - * Gets the manifest resource ID of the string to use for branding. This branding text appears next to your add-in icon in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - brandingTextResourceId: string; - /** - * Gets the manifest resource ID of the string to use as the subtitle. - * - * @remarks - * [Api set: WordApi 1.8] - */ - subtitleResourceId: string; - /** - * Gets the suggestions to display in the critique pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - suggestions: string[]; - /** - * Gets the manifest resource ID of the string to use as the title. - * - * @remarks - * [Api set: WordApi 1.8] - */ - titleResourceId: string; - } - /** - * Critique that will be rendered as underline for the specified part of paragraph in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface Critique { - /** - * Specifies the color scheme of the critique. - * - * @remarks - * [Api set: WordApi 1.7] - */ - colorScheme: Word.CritiqueColorScheme | "Red" | "Green" | "Blue" | "Lavender" | "Berry"; - /** - * Specifies the length of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - length: number; - /** - * Specifies the behavior of the pop-up menu for the critique. - * - * @remarks - * [Api set: WordApi 1.8] - */ - popupOptions?: Word.CritiquePopupOptions; - /** - * Specifies the start index of the critique inside paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - start: number; - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CritiqueAnnotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly range: Word.Range; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critique: Word.Critique; - /** - * Accepts the critique. This will change the annotation state to `accepted`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - accept(): void; - /** - * Rejects the critique. This will change the annotation state to `rejected`. - * - * @remarks - * [Api set: WordApi 1.7] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CritiqueAnnotationLoadOptions): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CritiqueAnnotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CritiqueAnnotation; - /** - * 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. - */ - track(): Word.CritiqueAnnotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CritiqueAnnotation; - /** - * 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's passed to it.) - * Whereas the original `Word.CritiqueAnnotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CritiqueAnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CritiqueAnnotationData; - } - /** - * Represents the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - enum AnnotationState { - /** - * Created. - * @remarks - * [Api set: WordApi 1.7] - */ - created = "Created", - /** - * Accepted. - * @remarks - * [Api set: WordApi 1.7] - */ - accepted = "Accepted", - /** - * Rejected. - * @remarks - * [Api set: WordApi 1.7] - */ - rejected = "Rejected", - } - /** - * Annotations set produced by the add-in. Currently supporting only critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationSet { - /** - * Critiques. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiques: Word.Critique[]; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class Annotation extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly critiqueAnnotation: Word.CritiqueAnnotation; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly id: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly state: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - /** - * Deletes the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationLoadOptions): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Annotation; - /** - * 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. - */ - track(): Word.Annotation; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Annotation; - /** - * 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's passed to it.) - * Whereas the original `Word.Annotation` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.AnnotationData; - } - /** - * Holds annotation information that is passed back on annotation added event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationInsertedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation inserted event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationClickedEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Holds annotation information that is passed back on annotation removed event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationRemovedEventArgs { - /** - * Specifies the annotation IDs for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - ids: string[]; - } - /** - * Holds annotation information that is passed back on annotation hovered event. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationHoveredEventArgs { - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id: string; - } - /** - * Represents action information that's passed back on annotation pop-up action event. - * - * @remarks - * [Api set: WordApi 1.8] - */ - export interface AnnotationPopupActionEventArgs { - /** - * Specifies the chosen action in the pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - */ - action: string; - /** - * Specifies the accepted suggestion (only populated when accepting a critique suggestion). - * - * @remarks - * [Api set: WordApi 1.8] - */ - critiqueSuggestion: string; - /** - * Specifies the annotation ID for which the event was fired. - * - * @remarks - * [Api set: WordApi 1.8] - */ - id: string; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class AnnotationCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Annotation[]; - /** - * Gets the first annotation in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirst(): Word.Annotation; - /** - * Gets the first annotation in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. - For further information, - see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.7] - */ - getFirstOrNullObject(): Word.Annotation; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.AnnotationCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.AnnotationCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.AnnotationCollection; - /** - * 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. - */ - track(): Word.AnnotationCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.AnnotationCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.AnnotationCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.AnnotationCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.AnnotationCollectionData; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Application extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ApplicationUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Application): void; - /** - * Creates a new document by using an optional Base64-encoded .docx file. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param base64File - Optional. The Base64-encoded .docx file. The default value is null. - */ - createDocument(base64File?: string): Word.DocumentCreated; - /** - * Opens a document and displays it in a new tab or window. - The following are examples for the various supported clients and platforms. - - - Remote or cloud location example: `https://microsoft.sharepoint.com/some/path/Document.docx` - - - Local location examples for Windows: `C:\\Users\\Someone\\Documents\\Document.docx` (includes required escaped backslashes), `file://mycomputer/myfolder/Document.docx` - - - Local location example for Mac and iOS: `/User/someone/document.docx` - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param filePath - Required. The absolute path of the .docx file. Word on the web only supports remote (cloud) locations, while Word on Windows, on Mac, and on iOS support local and remote locations. - */ - openDocument(filePath: string): void; - /** - * Parse styles from template Base64 file and return JSON format of retrieved styles as a string. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param base64File - Required. The template file. - */ - retrieveStylesFromBase64(base64File: string): OfficeExtension.ClientResult; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ApplicationLoadOptions): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Application; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Application; - /** - * Create a new instance of the `Word.Application` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.Application; - /** - * 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's passed to it.) - * Whereas the original `Word.Application` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ApplicationData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ApplicationData; - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Body extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBodyOrNullObject: Word.Body; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSection: Word.Section; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentSectionOrNullObject: Word.Section; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BodyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Body): void; - /** - * Clears the contents of the body object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Gets comments associated with the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the body. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the body object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Body.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the OOXML (Office Open XML) representation of the body object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole body, or the starting or ending point of the body, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the collection of the TrackedChange objects in the body. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): void; - /** - * Wraps the Body object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the document. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the body. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start' or 'End'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", values?: string[][]): Word.Table; - /** - * Inserts text into the body at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the body object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. Can be a maximum of 255 characters. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the body and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BodyLoadOptions): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Body; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Body; - /** - * 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. - */ - track(): Word.Body; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Body; - /** - * 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's passed to it.) - * Whereas the original `Word.Body` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BodyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BodyData; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class Border extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly location: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.BorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Border): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderLoadOptions): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Border; - /** - * 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. - */ - track(): Word.Border; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Border; - /** - * 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's passed to it.) - * Whereas the original `Word.Border` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.BorderData; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class BorderCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Border[]; - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Gets the border that has the specified location. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getByLocation(borderLocation: Word.BorderLocation.top | Word.BorderLocation.left | Word.BorderLocation.bottom | Word.BorderLocation.right | Word.BorderLocation.insideHorizontal | Word.BorderLocation.insideVertical | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical"): Word.Border; - /** - * Gets the first border in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.Border; - /** - * Gets the first border in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.Border; - /** - * Gets a Border object by its index in the collection. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param index - A number that identifies the index location of a Border object. - */ - getItem(index: number): Word.Border; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.BorderCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.BorderCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.BorderCollection; - /** - * 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. - */ - track(): Word.BorderCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.BorderCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.BorderCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.BorderCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.BorderCollectionData; - } - - - - - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export class CheckboxContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CheckboxContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CheckboxContentControl): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CheckboxContentControlLoadOptions): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CheckboxContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CheckboxContentControl; - /** - * 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. - */ - track(): Word.CheckboxContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CheckboxContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.CheckboxContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CheckboxContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CheckboxContentControlData; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Comment extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly replies: Word.CommentReplyCollection; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Comment): void; - /** - * Deletes the comment and its replies. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Gets the range in the main document where the comment is on. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getRange(): Word.Range; - /** - * Adds a new reply to the end of the comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param replyText - Required. Reply text. - */ - reply(replyText: string): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentLoadOptions): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Comment; - /** - * 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. - */ - track(): Word.Comment; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Comment; - /** - * 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's passed to it.) - * Whereas the original `Word.Comment` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentData; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Comment[]; - /** - * Gets the first comment in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Comment; - /** - * Gets the first comment in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Comment; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentCollection; - /** - * 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. - */ - track(): Word.CommentCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentCollectionData; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentContentRange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly isEmpty: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly text: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentContentRangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentContentRange): void; - /** - * Inserts text into at the specified location. **Note**: For the modern comment, the content range tracked across context turns to empty if any revision to the comment is posted through the UI. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param text - Required. The text to be inserted in to the CommentContentRange. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentContentRangeLoadOptions): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentContentRange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentContentRange; - /** - * 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. - */ - track(): Word.CommentContentRange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentContentRange; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentContentRange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentContentRangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentContentRangeData; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReply extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange: Word.CommentContentRange; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentComment: Word.Comment; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorEmail: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly authorName: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly creationDate: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CommentReplyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CommentReply): void; - /** - * Deletes the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyLoadOptions): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CommentReply; - /** - * 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. - */ - track(): Word.CommentReply; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReply; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReply` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CommentReplyData; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CommentReplyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CommentReply[]; - /** - * Gets the first comment reply in the collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.CommentReply; - /** - * Gets the first comment reply in the collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.CommentReply; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CommentReplyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CommentReplyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CommentReplyCollection; - /** - * 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. - */ - track(): Word.CommentReplyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CommentReplyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CommentReplyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CommentReplyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CommentReplyCollectionData; - } - - - - - - - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControl extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - readonly checkboxContentControl: Word.CheckboxContentControl; - - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - - - /** - * Gets the collection of endnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the content control. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly id: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly subtype: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly type: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ContentControlUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ContentControl): void; - /** - * Clears the contents of the content control. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the content control and its content. If `keepContent` is set to true, the content isn't deleted. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param keepContent - Required. Indicates whether the content should be deleted with the content control. If `keepContent` is set to true, the content isn't deleted. - */ - delete(keepContent: boolean): void; - /** - * Gets comments associated with the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported child content controls in this content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the content control object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `ContentControl.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the Office Open XML (OOXML) representation of the content control object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the whole content control, or the starting or ending point of the content control, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'Before', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation | "Whole" | "Start" | "End" | "Before" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the content control by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the content control. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts a break at the specified location in the main document. This method cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. Type of break. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): void; - /** - * Inserts a document into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts HTML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts an inline picture into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted in the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns into, or next to, a content control. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. 'Before' and 'After' cannot be used with 'RichTextTable', 'RichTextTableRow' and 'RichTextTableCell' content controls. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the content control at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. The text to be inserted in to the content control. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. 'Replace' cannot be used with 'RichTextTable' and 'RichTextTableRow' content controls. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Performs a search with the specified SearchOptions on the scope of the content control object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the content control. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the content control into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlLoadOptions): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ContentControl; - /** - * Occurs when data within the content control are changed. To get the new text, load this content control in the handler. To get the old text, do not load it. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDataChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is deleted. Do not load this content control in the handler, otherwise you won't be able to get its original properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onDeleted: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is entered. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onEntered: OfficeExtension.EventHandlers; - /** - * Occurs when the content control is exited, for example, when the cursor leaves the content control. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onExited: OfficeExtension.EventHandlers; - /** - * Occurs when selection within the content control is changed. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onSelectionChanged: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.ContentControl; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControl; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControl` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ContentControlData; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ContentControlCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ContentControl[]; - /** - * Gets the content controls that have the specified tracking state. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param changeTrackingStates - Required. An array of content control change tracking states. - */ - getByChangeTrackingStates(changeTrackingStates: Word.ChangeTrackingState[]): Word.ContentControlCollection; - /** - * Gets a content control by its identifier. Throws an `ItemNotFound` error if there isn't a content control with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - Required. A content control identifier. - */ - getById(id: number): Word.ContentControl; - /** - * Gets a content control by its identifier. If there isn't a content control with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A content control identifier. - */ - getByIdOrNullObject(id: number): Word.ContentControl; - /** - * Gets the content controls that have the specified tag. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param tag - Required. A tag set on a content control. - */ - getByTag(tag: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified title. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param title - Required. The title of a content control. - */ - getByTitle(title: string): Word.ContentControlCollection; - /** - * Gets the content controls that have the specified types. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param types - Required. An array of content control types. - */ - getByTypes(types: Word.ContentControlType[]): Word.ContentControlCollection; - /** - * Gets the first content control in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.ContentControl; - /** - * Gets the first content control in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.ContentControl; - /** - * Gets a content control by its ID. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param id - The content control's ID. - */ - getItem(id: number): Word.ContentControl; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ContentControlCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ContentControlCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ContentControlCollection; - /** - * 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. - */ - track(): Word.ContentControlCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ContentControlCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ContentControlCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ContentControlCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ContentControlCollectionData; - } - - - /** - * Specifies the options that define which content controls are returned. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlOptions { - /** - * An array of content control types, item must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7. - * 'DropDownList' and 'ComboBox' support was added in WordApi 1.9. - */ - types: Word.ContentControlType[]; - } - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomProperty extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly key: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly type: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomPropertyUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomProperty): void; - /** - * Deletes the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyLoadOptions): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomProperty; - /** - * 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. - */ - track(): Word.CustomProperty; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomProperty; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomProperty` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomPropertyData; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class CustomPropertyCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomProperty[]; - /** - * Creates a new or sets an existing custom property. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The custom property's key, which is case-insensitive. - * @param value - Required. The custom property's value. - */ - add(key: string, value: any): Word.CustomProperty; - /** - * Deletes all custom properties in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteAll(): void; - /** - * Gets the count of custom properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom property object by its key, which is case-insensitive. Throws an `ItemNotFound` error if the custom property doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - The key that identifies the custom property object. - */ - getItem(key: string): Word.CustomProperty; - /** - * Gets a custom property object by its key, which is case-insensitive. If the custom property doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param key - Required. The key that identifies the custom property object. - */ - getItemOrNullObject(key: string): Word.CustomProperty; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomPropertyCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomPropertyCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomPropertyCollection; - /** - * 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. - */ - track(): Word.CustomPropertyCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomPropertyCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomPropertyCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomPropertyCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomPropertyCollectionData; - } - - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPart extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly id: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly namespaceUri: string; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CustomXmlPartUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.CustomXmlPart): void; - - /** - * Deletes the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Deletes an attribute with the given name from the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - */ - deleteAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string): void; - /** - * Deletes the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - deleteElement(xpath: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Gets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getXml(): OfficeExtension.ClientResult; - /** - * Inserts an attribute with the given name and value to the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. Value of the attribute. - */ - insertAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Inserts the given XML under the parent element identified by xpath at child position index. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single parent element in XPath notation. - * @param xml - Required. XML content to be inserted. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param index - Optional. Zero-based position at which the new XML to be inserted. If omitted, the XML will be appended as the last child of this parent. - */ - insertElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }, index?: number): void; - - /** - * Queries the XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. An XPath query. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @returns An array where each item represents an entry matched by the XPath query. - */ - query(xpath: string, namespaceMappings: { - [key: string]: string; - }): OfficeExtension.ClientResult; - - - /** - * Sets the full XML content of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content to be set. - */ - setXml(xml: string): void; - /** - * Updates the value of an attribute with the given name of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - * @param name - Required. Name of the attribute. - * @param value - Required. New value of the attribute. - */ - updateAttribute(xpath: string, namespaceMappings: { - [key: string]: string; - }, name: string, value: string): void; - /** - * Updates the XML of the element identified by xpath. - * - * @remarks - * [Api set: WordApi 1.4] - * - * If any element in the tree has an xmlns attribute (whose value is typically, but not always, a URI), - * an alias for that attribute value must prefix the element name in the xpath parameter. For example, suppose - * the tree is the following: - * - * ```xml - * - * - * something - * - * - * ``` - * - * The xpath to `` must be \/Day\/greg:Month\/Week, where greg is an alias that is mapped to - * "http:\/\/calendartypes.org\/xsds\/GregorianCalendar" in the namespaceMappings parameter. - * - * @param xpath - Required. Absolute path to the single element in XPath notation. - * @param xml - Required. New XML content to be stored. - * @param namespaceMappings - Required. An object whose property values are namespace names and whose property names are aliases for the corresponding namespaces. For example, `{greg: "http://calendartypes.org/xsds/GregorianCalendar"}`. The property names (such as "greg") can be any string that doesn't used reserved XPath characters, such as the forward slash "/". - */ - updateElement(xpath: string, xml: string, namespaceMappings: { - [key: string]: string; - }): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartLoadOptions): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.CustomXmlPart; - /** - * 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. - */ - track(): Word.CustomXmlPart; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPart; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPart` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CustomXmlPartData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Adds a new custom XML part to the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param xml - Required. XML content. Must be a valid XML fragment. - */ - add(xml: string): Word.CustomXmlPart; - /** - * Gets a new scoped collection of custom XML parts whose namespaces match the given namespace. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param namespaceUri - Required. The namespace URI. - */ - getByNamespace(namespaceUri: string): Word.CustomXmlPartScopedCollection; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID or index of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartCollectionData; - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class CustomXmlPartScopedCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.CustomXmlPart[]; - /** - * Gets the number of items in the collection. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a custom XML part based on its ID. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - ID of the custom XML part to be retrieved. - */ - getItem(id: string): Word.CustomXmlPart; - /** - * Gets a custom XML part based on its ID. If the CustomXmlPart doesn't exist in the collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param id - Required. ID of the object to be retrieved. - */ - getItemOrNullObject(id: string): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method produces an error. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItem(): Word.CustomXmlPart; - /** - * If the collection contains exactly one item, this method returns it. Otherwise, this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getOnlyItemOrNullObject(): Word.CustomXmlPart; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CustomXmlPartScopedCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.CustomXmlPartScopedCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.CustomXmlPartScopedCollection; - /** - * 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. - */ - track(): Word.CustomXmlPartScopedCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.CustomXmlPartScopedCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.CustomXmlPartScopedCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CustomXmlPartScopedCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.CustomXmlPartScopedCollectionData; - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Document extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activeWindow: Word.Window; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly customXmlParts: Word.CustomXmlPartCollection; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly sections: Word.SectionCollection; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly settings: Word.SettingCollection; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly windows: Word.WindowCollection; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Document): void; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: Word.StyleType): Word.Style; - /** - * Adds a style into the document by name and type. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. A string representing the style name. - * @param type - Required. The style type, including character, list, paragraph, or table. - */ - addStyle(name: string, type: "Character" | "List" | "Paragraph" | "Table"): Word.Style; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: Word.CloseBehavior): void; - /** - * Closes the current document. - - Note: This API isn't supported in Word on the web. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param closeBehavior - Optional. The close behavior must be 'Save' or 'SkipSave'. Default value is 'Save'. - */ - close(closeBehavior?: "Save" | "SkipSave"): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param filePath - Required. The path of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specifies the behavior of comparing document. - */ - compare(filePath: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Displays revision marks that indicate where the specified document differs from another document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64File - Required. The Base64-encoded content of the document with which the specified document is compared. - * @param documentCompareOptions - Optional. The additional options that specify the behavior for comparing the documents. Note that the `compareTarget` option isn't allowed to be `CompareTargetSelected` in this API. - */ - compareFromBase64(base64File: string, documentCompareOptions?: Word.DocumentCompareOptions): void; - /** - * Deletes a bookmark, if it exists, from the document. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - deleteBookmark(name: string): void; - - /** - * Gets the annotation by ID. Throws an `ItemNotFound` error if annotation isn't found. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param id - The ID of the annotation to get. - */ - getAnnotationById(id: string): Word.Annotation; - /** - * Gets a bookmark's range. Throws an `ItemNotFound` error if the bookmark doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRange(name: string): Word.Range; - /** - * Gets a bookmark's range. If the bookmark doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param name - Required. The case-insensitive bookmark name. - */ - getBookmarkRangeOrNullObject(name: string): Word.Range; - /** - * Gets the currently supported content controls in the document. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets the document's endnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getEndnoteBody(): Word.Body; - /** - * Gets the document's footnotes in a single body. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFootnoteBody(): Word.Body; - /** - * Gets the paragraph by its unique local ID. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @param id - Required. Unique local ID in standard 8-4-4-4-12 GUID format without curly braces. Note that the ID differs across sessions and coauthors. - */ - getParagraphByUniqueLocalId(id: string): Word.Paragraph; - /** - * Gets the current selection of the document. Multiple selections aren't supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getSelection(): Word.Range; - /** - * Gets a StyleCollection object that represents the whole style set of the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getStyles(): Word.StyleCollection; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: Word.ImportedStylesConflictBehavior): OfficeExtension.ClientResult; - /** - * Import styles from a JSON-formatted string. - * - * @remarks - * [Api set: WordApi 1.6] - * - * Note: The `importedStylesConflictBehavior` parameter was introduced in WordApiDesktop 1.1. - * - * @param stylesJson - Required. A JSON-formatted string representing the styles. - * @param importedStylesConflictBehavior - Optional. Specifies how to handle any imported styles with the same name as existing styles in the current document. - */ - importStylesFromJson(stylesJson: string, importedStylesConflictBehavior?: "Ignore" | "Overwrite" | "CreateNew"): OfficeExtension.ClientResult; - /** - * Inserts a document into the target document at a specific location with additional properties. - Headers, footers, watermarks, and other section properties are copied by default. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - * @param insertFileOptions - Optional. The additional properties that should be imported to the destination document. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End", insertFileOptions?: Word.InsertFileOptions): Word.SectionCollection; - - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApi 1.5. - * - * @param saveBehavior - Optional. The save behavior must be 'Save' or 'Prompt'. Default value is 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Performs a search with the specified search options on the scope of the whole document. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentLoadOptions): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Document; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Document; - /** - * Occurs when the user clicks an annotation (or selects it using **Alt+Down**). - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationClicked: OfficeExtension.EventHandlers; - /** - * Occurs when the user hovers the cursor over an annotation. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationHovered: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationInserted: OfficeExtension.EventHandlers; - /** - * Occurs when the user performs an action in an annotation pop-up menu. - * - * @remarks - * [Api set: WordApi 1.8] - * - * @eventproperty - */ - readonly onAnnotationPopupAction: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes one or more annotations. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @eventproperty - */ - readonly onAnnotationRemoved: OfficeExtension.EventHandlers; - /** - * Occurs when a content control is added. Run context.sync() in the handler to get the new content control's properties. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @eventproperty - */ - readonly onContentControlAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user adds new paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphAdded: OfficeExtension.EventHandlers; - /** - * Occurs when the user changes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphChanged: OfficeExtension.EventHandlers; - /** - * Occurs when the user deletes paragraphs. - * - * @remarks - * [Api set: WordApi 1.6] - * - * @eventproperty - */ - readonly onParagraphDeleted: OfficeExtension.EventHandlers; - /** - * 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. - */ - track(): Word.Document; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Document; - /** - * 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's passed to it.) - * Whereas the original `Word.Document` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentData; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentCreated extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly body: Word.Body; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly contentControls: Word.ContentControlCollection; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly properties: Word.DocumentProperties; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly sections: Word.SectionCollection; - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - readonly saved: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentCreatedUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentCreated): void; - - - - - - - - - /** - * Opens the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - open(): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: Word.SaveBehavior, fileName?: string): void; - /** - * Saves the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - * - * Note: The `saveBehavior` and `fileName` parameters were introduced in WordApiHiddenDocument 1.5. - * - * @param saveBehavior - Optional. DocumentCreated only supports 'Save'. - * @param fileName - Optional. The file name (exclude file extension). Only takes effect for a new document. - */ - save(saveBehavior?: "Save" | "Prompt", fileName?: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentCreatedLoadOptions): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentCreated; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentCreated; - /** - * 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. - */ - track(): Word.DocumentCreated; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentCreated; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentCreated` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentCreatedData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentCreatedData; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class DocumentProperties extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly customProperties: Word.CustomPropertyCollection; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly applicationName: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly creationDate: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastAuthor: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastPrintDate: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lastSaveTime: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly revisionNumber: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly security: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly template: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.DocumentPropertiesUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.DocumentProperties): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.DocumentPropertiesLoadOptions): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.DocumentProperties; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.DocumentProperties; - /** - * 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. - */ - track(): Word.DocumentProperties; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.DocumentProperties; - /** - * 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's passed to it.) - * Whereas the original `Word.DocumentProperties` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.DocumentPropertiesData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.DocumentPropertiesData; - } - - - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class Field extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly result: Word.Range; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly kind: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FieldUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Field): void; - /** - * Deletes the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next field. Throws an `ItemNotFound` error if this field is the last one. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNext(): Word.Field; - /** - * Gets the next field. If this field is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getNextOrNullObject(): Word.Field; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the field. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Updates the field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - updateResult(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldLoadOptions): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Field; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Field; - /** - * 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. - */ - track(): Word.Field; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Field; - /** - * 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's passed to it.) - * Whereas the original `Word.Field` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FieldData; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export class FieldCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Field[]; - /** - * Gets the first field in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirst(): Word.Field; - /** - * Gets the first field in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getFirstOrNullObject(): Word.Field; - /** - * Gets the Field object collection including the specified types of fields. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param types - Required. An array of field types. - */ - getByTypes(types: Word.FieldType[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FieldCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.FieldCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.FieldCollection; - /** - * 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. - */ - track(): Word.FieldCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.FieldCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.FieldCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FieldCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.FieldCollectionData; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Font extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.FontUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Font): void; - - - - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.FontLoadOptions): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Font; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Font; - /** - * 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. - */ - track(): Word.Font; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Font; - /** - * 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's passed to it.) - * Whereas the original `Word.Font` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.FontData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.FontData; - } - - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePicture extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly paragraph: Word.Paragraph; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly imageFormat: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.InlinePictureUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.InlinePicture): void; - /** - * Deletes the inline picture from the document. - * - * @remarks - * [Api set: WordApi 1.2] - */ - delete(): void; - /** - * Gets the Base64-encoded string representation of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getBase64ImageSrc(): OfficeExtension.ClientResult; - /** - * Gets the next inline image. Throws an `ItemNotFound` error if this inline image is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.InlinePicture; - /** - * Gets the next inline image. If this inline image is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.InlinePicture; - /** - * Gets the picture, or the starting or ending point of the picture, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Wraps the inline picture with a rich text content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts an inline picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Range; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the inline picture. This causes Word to scroll to the selection. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureLoadOptions): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.InlinePicture; - /** - * 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. - */ - track(): Word.InlinePicture; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePicture; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePicture` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.InlinePictureData; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class InlinePictureCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.InlinePicture[]; - /** - * Gets the first inline image in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.InlinePicture; - /** - * Gets the first inline image in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.InlinePicture; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.InlinePictureCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.InlinePictureCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.InlinePictureCollection; - /** - * 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. - */ - track(): Word.InlinePictureCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.InlinePictureCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.InlinePictureCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.InlinePictureCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.InlinePictureCollectionData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class List extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly id: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelExistences: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly levelTypes: Word.ListLevelType[]; - /** - * Gets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelFont(level: number): Word.Font; - /** - * Gets the paragraphs that occur at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelParagraphs(level: number): Word.ParagraphCollection; - /** - * Gets the Base64-encoded string representation of the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - */ - getLevelPicture(level: number): OfficeExtension.ClientResult; - /** - * Gets the bullet, number, or picture at the specified level as a string. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - */ - getLevelString(level: number): OfficeExtension.ClientResult; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Start', 'End', 'Before', or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | Word.InsertLocation.before | Word.InsertLocation.after | "Start" | "End" | "Before" | "After"): Word.Paragraph; - /** - * Resets the font of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param resetFontName - Optional. Indicates whether to reset the font name. Default is false that indicates the font name is kept unchanged. - */ - resetLevelFont(level: number, resetFontName?: boolean): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: Word.Alignment): void; - /** - * Sets the alignment of the bullet, number, or picture at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param alignment - Required. The level alignment that must be 'Left', 'Centered', or 'Right'. - */ - setLevelAlignment(level: number, alignment: "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: Word.ListBullet, charCode?: number, fontName?: string): void; - /** - * Sets the bullet format at the specified level in the list. If the bullet is 'Custom', the charCode is required. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listBullet - Required. The bullet. - * @param charCode - Optional. The bullet character's code value. Used only if the bullet is 'Custom'. - * @param fontName - Optional. The bullet's font name. Used only if the bullet is 'Custom'. - */ - setLevelBullet(level: number, listBullet: "Custom" | "Solid" | "Hollow" | "Square" | "Diamonds" | "Arrow" | "Checkmark", charCode?: number, fontName?: string): void; - /** - * Sets the two indents of the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param textIndent - Required. The text indent in points. It is the same as paragraph left indent. - * @param bulletNumberPictureIndent - Required. The relative indent, in points, of the bullet, number, or picture. It is the same as paragraph first line indent. - */ - setLevelIndents(level: number, textIndent: number, bulletNumberPictureIndent: number): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: Word.ListNumbering, formatString?: Array): void; - /** - * Sets the numbering format at the specified level in the list. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param listNumbering - Required. The ordinal format. - * @param formatString - Optional. The numbering string format defined as an array of strings and/or integers. Each integer is a level of number type that is higher than or equal to this level. For example, an array of ["(", level - 1, ".", level, ")"] can define the format of "(2.c)", where 2 is the parent's item number and c is this level's item number. - */ - setLevelNumbering(level: number, listNumbering: "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter", formatString?: Array): void; - /** - * Sets the picture at the specified level in the list. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - * - * @param level - Required. The level in the list. - * @param base64EncodedImage - Optional. The Base64-encoded image to be set. If not given, the default picture is set. - */ - setLevelPicture(level: number, base64EncodedImage?: string): void; - /** - * Sets the starting number at the specified level in the list. Default value is 1. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param level - Required. The level in the list. - * @param startingNumber - Required. The number to start with. - */ - setLevelStartingNumber(level: number, startingNumber: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLoadOptions): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.List; - /** - * 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. - */ - track(): Word.List; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.List; - /** - * 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's passed to it.) - * Whereas the original `Word.List` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListData; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.List[]; - /** - * Gets a list by its identifier. Throws an `ItemNotFound` error if there isn't a list with the identifier in this collection. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getById(id: number): Word.List; - /** - * Gets a list by its identifier. If there isn't a list with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - Required. A list identifier. - */ - getByIdOrNullObject(id: number): Word.List; - /** - * Gets the first list in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.List; - /** - * Gets the first list in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.List; - /** - * Gets a list object by its ID. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param id - The list's ID. - */ - getItem(id: number): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListCollection; - /** - * 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. - */ - track(): Word.ListCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListCollectionData; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class ListItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listString: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly siblingIndex: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListItem): void; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. Throws an `ItemNotFound` error if the list item has no ancestor. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestor(parentOnly?: boolean): Word.Paragraph; - /** - * Gets the list item parent, or the closest ancestor if the parent doesn't exist. If the list item has no ancestor, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param parentOnly - Optional. Specifies only the list item's parent will be returned. The default is false that specifies to get the lowest ancestor. - */ - getAncestorOrNullObject(parentOnly?: boolean): Word.Paragraph; - /** - * Gets all descendant list items of the list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param directChildrenOnly - Optional. Specifies only the list item's direct children will be returned. The default is false that indicates to get all descendant items. - */ - getDescendants(directChildrenOnly?: boolean): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListItemLoadOptions): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListItem; - /** - * 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. - */ - track(): Word.ListItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListItem; - /** - * 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's passed to it.) - * Whereas the original `Word.ListItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListItemData; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevel extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly font: Word.Font; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListLevelUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListLevel): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelLoadOptions): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListLevel; - /** - * 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. - */ - track(): Word.ListLevel; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevel; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevel` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListLevelData; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListLevelCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.ListLevel[]; - /** - * Gets the first list level in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirst(): Word.ListLevel; - /** - * Gets the first list level in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - getFirstOrNullObject(): Word.ListLevel; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListLevelCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListLevelCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ListLevelCollection; - /** - * 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. - */ - track(): Word.ListLevelCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListLevelCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ListLevelCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListLevelCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ListLevelCollectionData; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export class ListTemplate extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listLevels: Word.ListLevelCollection; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ListTemplateUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ListTemplate): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ListTemplateLoadOptions): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ListTemplate; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ListTemplate; - /** - * 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. - */ - track(): Word.ListTemplate; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ListTemplate; - /** - * 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's passed to it.) - * Whereas the original `Word.ListTemplate` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ListTemplateData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ListTemplateData; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItem extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly body: Word.Body; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly reference: Word.Range; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.NoteItemType | "Footnote" | "Endnote"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.NoteItemUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.NoteItem): void; - /** - * Deletes the note item. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - /** - * Gets the next note item of the same type. Throws an `ItemNotFound` error if this note item is the last one. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNext(): Word.NoteItem; - /** - * Gets the next note item of the same type. If this note item is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getNextOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemLoadOptions): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.NoteItem; - /** - * 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. - */ - track(): Word.NoteItem; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItem; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItem` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.NoteItemData; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class NoteItemCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.NoteItem[]; - /** - * Gets the first note item in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirst(): Word.NoteItem; - /** - * Gets the first note item in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getFirstOrNullObject(): Word.NoteItem; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.NoteItemCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.NoteItemCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.NoteItemCollection; - /** - * 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. - */ - track(): Word.NoteItemCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.NoteItemCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.NoteItemCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.NoteItemCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.NoteItemCollectionData; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Page extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly height: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly index: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly width: number; - /** - * Gets the next page in the pane. Throws an `ItemNotFound` error if this page is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Page; - /** - * Gets the next page. If this page is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Page; - /** - * Gets the whole page, or the starting or ending point of the page, as a range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', or 'End'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageLoadOptions): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Page; - /** - * 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. - */ - track(): Word.Page; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Page; - /** - * 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's passed to it.) - * Whereas the original `Word.Page` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PageData; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PageCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Page[]; - /** - * Gets the first page in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Page; - /** - * Gets the first page in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Page; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.PageCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PageCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PageCollection; - /** - * 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. - */ - track(): Word.PageCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PageCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PageCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PageCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PageCollectionData; - } - /** - * Represents a window pane. The `Pane` object is a member of the pane collection. The pane collection includes all the window panes for a single window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Pane extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pagesEnclosingViewport: Word.PageCollection; - /** - * Gets the next pane in the window. Throws an `ItemNotFound` error if this pane is the last one. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNext(): Word.Pane; - /** - * Gets the next pane. If this pane is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getNextOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Pane; - /** - * 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. - */ - track(): Word.Pane; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Pane; - /** - * 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's passed to it.) - * Whereas the original `Word.Pane` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.PaneData; - } - /** - * Represents the collection of pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class PaneCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Pane[]; - /** - * Gets the first pane in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Pane; - /** - * Gets the first pane in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Pane; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.PaneCollection; - /** - * 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. - */ - track(): Word.PaneCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.PaneCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.PaneCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.PaneCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.PaneCollectionData; - } - /** - * Represents the window that displays the document. A window can be split to contain multiple reading panes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Window extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the active pane in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly activePane: Word.Pane; - /** - * Gets the collection of panes in the window. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly panes: Word.PaneCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Window; - /** - * 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. - */ - track(): Word.Window; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Window; - /** - * 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's passed to it.) - * Whereas the original `Word.Window` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.WindowData; - } - /** - * Represents the collection of window objects. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class WindowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Window[]; - /** - * Gets the first window in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Window; - /** - * Gets the first window in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Window; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.WindowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.WindowCollection; - /** - * 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. - */ - track(): Word.WindowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.WindowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.WindowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.WindowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.WindowCollectionData; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Paragraph extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - - /** - * Gets the collection of content control objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly inlinePictures: Word.InlinePictureCollection; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly list: Word.List; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItem: Word.ListItem; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listItemOrNullObject: Word.ListItem; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly listOrNullObject: Word.List; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isLastParagraph: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isListItem: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tableNestingLevel: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly uniqueLocalId: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Paragraph): void; - /** - * Lets the paragraph join an existing list at the specified level. Fails if the paragraph cannot join the list or if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param listId - Required. The ID of an existing list. - * @param level - Required. The level in the list. - */ - attachToList(listId: number, level: number): Word.List; - /** - * Clears the contents of the paragraph object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Deletes the paragraph and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - /** - * Moves this paragraph out of its list, if the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - detachFromList(): void; - /** - * Gets annotations set on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - */ - getAnnotations(): Word.AnnotationCollection; - /** - * Gets comments associated with the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the paragraph. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the paragraph object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Paragraph.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets the next paragraph. Throws an `ItemNotFound` error if the paragraph is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Paragraph; - /** - * Gets the next paragraph. If the paragraph is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Paragraph; - /** - * Gets the Office Open XML (OOXML) representation of the paragraph object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Gets the previous paragraph. Throws an `ItemNotFound` error if the paragraph is the first one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPrevious(): Word.Paragraph; - /** - * Gets the previous paragraph. If the paragraph is the first one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getPreviousOrNullObject(): Word.Paragraph; - /** - * Gets the whole paragraph, or the starting or ending point of the paragraph, as a range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Returns the text of the paragraph. This excludes equations, graphics (e.g., images, videos, drawings), and special characters that mark various content (e.g., for content controls, fields, comments, footnotes, endnotes). - By default, hidden text and text marked as deleted are excluded. - * - * @remarks - * [Api set: WordApi 1.7] - * - * @param options - Optional. Options that define whether the final result should include hidden text and text marked as deleted. - */ - getText(options?: Word.GetTextOptions | { - IncludeHiddenText?: boolean; - IncludeTextMarkedAsDeleted?: boolean; - }): OfficeExtension.ClientResult; - /** - * Gets the text ranges in the paragraph by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the paragraph. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Inserts annotations on this Paragraph object. - * - * @remarks - * [Api set: WordApi 1.7] - * - * Important: This API requires a Microsoft 365 subscription in order to work properly because of an underlying service's requirement. For more about this, see {@link https://github.com/OfficeDev/office-js/issues/4953 | GitHub issue 4953}. - * - * @param annotations - Annotations to set. - * @returns An array of the inserted annotations identifiers. - */ - insertAnnotations(annotations: Word.AnnotationSet): OfficeExtension.ClientResult; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add to the document. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Wraps the Paragraph object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts a document into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a picture into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.InlinePicture; - /** - * Inserts OOXML into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted in the paragraph. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Optional. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text into the paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', or 'End'. - */ - insertText(text: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the paragraph. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Performs a search with the specified SearchOptions on the scope of the paragraph object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the paragraph into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Starts a new list with this paragraph. Fails if the paragraph is already a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - startNewList(): Word.List; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphLoadOptions): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Paragraph; - /** - * 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. - */ - track(): Word.Paragraph; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Paragraph; - /** - * 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's passed to it.) - * Whereas the original `Word.Paragraph` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphData; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class ParagraphCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Paragraph[]; - /** - * Gets the first paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Paragraph; - /** - * Gets the first paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. Throws an `ItemNotFound` error if the collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLast(): Word.Paragraph; - /** - * Gets the last paragraph in this collection. If the collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getLastOrNullObject(): Word.Paragraph; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ParagraphCollection; - /** - * 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. - */ - track(): Word.ParagraphCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ParagraphCollectionData; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class ParagraphFormat extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ParagraphFormatUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ParagraphFormat): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ParagraphFormatLoadOptions): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ParagraphFormat; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ParagraphFormat; - /** - * 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. - */ - track(): Word.ParagraphFormat; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ParagraphFormat; - /** - * 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's passed to it.) - * Whereas the original `Word.ParagraphFormat` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ParagraphFormatData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ParagraphFormatData; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Range extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of content control objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly contentControls: Word.ContentControlCollection; - /** - * Gets the collection of endnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the range. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - readonly inlinePictures: Word.InlinePictureCollection; - - /** - * Gets the collection of list objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly lists: Word.ListCollection; - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly pages: Word.PageCollection; - /** - * Gets the collection of paragraph objects in the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this range aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - readonly paragraphs: Word.ParagraphCollection; - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - - /** - * Gets the collection of table objects in the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isEmpty: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly text: string; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.RangeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Range): void; - /** - * Clears the contents of the range object. The user can perform the undo operation on the cleared content. - * - * @remarks - * [Api set: WordApi 1.1] - */ - clear(): void; - /** - * Compares this range's location with another range's location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. The range to compare with this range. - */ - compareLocationWith(range: Word.Range): OfficeExtension.ClientResult; - /** - * Deletes the range and its content from the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - delete(): void; - - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges don't have a union. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandTo(range: Word.Range): Word.Range; - /** - * Returns a new range that extends from this range in either direction to cover another range. This range isn't changed. If the two ranges don't have a union, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - expandToOrNullObject(range: Word.Range): Word.Range; - /** - * Gets the names all bookmarks in or overlapping the range. A bookmark is hidden if its name starts with the underscore character. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param includeHidden - Optional. Indicates whether to include hidden bookmarks. Default is false which indicates that the hidden bookmarks are excluded. - * @param includeAdjacent - Optional. Indicates whether to include bookmarks that are adjacent to the range. Default is false which indicates that the adjacent bookmarks are excluded. - */ - getBookmarks(includeHidden?: boolean, includeAdjacent?: boolean): OfficeExtension.ClientResult; - /** - * Gets comments associated with the range. - * - * @remarks - * [Api set: WordApi 1.4] - * @returns - */ - getComments(): Word.CommentCollection; - /** - * Gets the currently supported content controls in the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * **Important**: If specific types are provided in the options parameter, only content controls of supported types are returned. - * Be aware that an exception will be thrown on using methods of a generic {@link Word.ContentControl} that aren't relevant for the specific type. - * With time, additional types of content controls may be supported. Therefore, your add-in should request and handle specific types of content controls. - * - * @param options - Optional. Options that define which content controls are returned. - */ - getContentControls(options?: Word.ContentControlOptions): Word.ContentControlCollection; - /** - * Gets an HTML representation of the range object. When rendered in a web page or HTML viewer, the formatting will be a close, but not exact, match for of the formatting of the document. This method doesn't return the exact same HTML for the same document on different platforms (Windows, Mac, Word on the web, etc.). If you need exact fidelity, or consistency across platforms, use `Range.getOoxml()` and convert the returned XML to HTML. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getHtml(): OfficeExtension.ClientResult; - /** - * Gets hyperlink child ranges within the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getHyperlinkRanges(): Word.RangeCollection; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. Throws an `ItemNotFound` error if this text range is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRange(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the next text range by using punctuation marks and/or other ending marks. If this text range is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the returned range. Default is false which indicates that spacing characters at the start and end of the range are included. - */ - getNextTextRangeOrNullObject(endingMarks: string[], trimSpacing?: boolean): Word.Range; - /** - * Gets the OOXML representation of the range object. - * - * @remarks - * [Api set: WordApi 1.1] - */ - getOoxml(): OfficeExtension.ClientResult; - /** - * Clones the range, or gets the starting or ending point of the range as a new range. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', 'After', or 'Content'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | Word.RangeLocation.content | "Whole" | "Start" | "End" | "After" | "Content"): Word.Range; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: Word.ChangeTrackingVersion): OfficeExtension.ClientResult; - /** - * Gets reviewed text based on ChangeTrackingVersion selection. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param changeTrackingVersion - Optional. The value must be 'Original' or 'Current'. The default is 'Current'. - */ - getReviewedText(changeTrackingVersion?: "Original" | "Current"): OfficeExtension.ClientResult; - /** - * Gets the text child ranges in the range by using punctuation marks and/or other ending marks. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param endingMarks - Required. The punctuation marks and/or other ending marks as an array of strings. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - getTextRanges(endingMarks: string[], trimSpacing?: boolean): Word.RangeCollection; - /** - * Gets the collection of the TrackedChange objects in the range. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getTrackedChanges(): Word.TrackedChangeCollection; - /** - * Highlights the range temporarily without changing document content. - To highlight the text permanently, set the range's Font.HighlightColor. - * - * @remarks - * [Api set: WordApi 1.8] - */ - highlight(): void; - /** - * Inserts a bookmark on the range. If a bookmark of the same name exists somewhere, it is deleted first. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The conditions of inserting a bookmark are similar to doing so in the Word UI. To learn more about managing bookmarks in the Word UI, see {@link https://support.microsoft.com/office/f68d781f-0150-4583-a90e-a4009d99c2a0 | Add or delete bookmarks in a Word document or Outlook message}. - * - * @param name - Required. The case-insensitive bookmark name. Only alphanumeric and underscore characters are supported. It must begin with a letter but if you want to tag the bookmark as hidden, then start the name with an underscore character. Names can't be longer than 40 characters. - */ - insertBookmark(name: string): void; - /** - * Inserts a break at the specified location in the main document. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param breakType - Required. The break type to add. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): void; - /** - * Inserts a floating canvas in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param insertShapeOptions - Optional. The location and size of the canvas. The default location and size is (0, 0, 300, 200). - */ - insertCanvas(insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Insert a comment on the range. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param commentText - Required. The comment text to be inserted. - * @returns comment object - */ - insertComment(commentText: string): Word.Comment; - /** - * Wraps the Range object with a content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * 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. - * `DropDownList` and `ComboBox` support was added in WordApi 1.9. - * - * @param contentControlType - Optional. Content control type to insert. Must be 'RichText', 'PlainText', 'CheckBox', 'DropDownList', or 'ComboBox'. The default is 'RichText'. - */ - insertContentControl(contentControlType?: Word.ContentControlType.richText | Word.ContentControlType.plainText | Word.ContentControlType.checkBox | Word.ContentControlType.dropDownList | Word.ContentControlType.comboBox | "RichText" | "PlainText" | "CheckBox" | "DropDownList" | "ComboBox"): Word.ContentControl; - /** - * Inserts an endnote. The endnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the endnote body. The default is "". - */ - insertEndnote(insertText?: string): Word.NoteItem; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: Word.FieldType, text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a field at the specified location. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Important: In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`. - * In Word on the web, fields are mainly read-only. To learn more, see {@link https://learn.microsoft.com/office/dev/add-ins/word/fields-guidance | Use fields in your Word add-in}. - * - * @param insertLocation - Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - * @param fieldType - Optional. Can be any FieldType constant. The default value is Empty. - * @param text - Optional. Additional properties or options if needed for specified field type. - * @param removeFormatting - Optional. `true` to remove the formatting that's applied to the field during updates, `false` otherwise. The default value is `false`. - */ - insertField(insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After", fieldType?: "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined", text?: string, removeFormatting?: boolean): Word.Field; - /** - * Inserts a document at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Insertion isn't supported if the document being inserted contains an ActiveX control (likely in a form field). Consider replacing such a form field with a content control or other option appropriate for your scenario. - * - * @param base64File - Required. The Base64-encoded content of a .docx file. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a footnote. The footnote reference is placed after the range. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param insertText - Optional. Text to be inserted into the footnote body. The default is "". - */ - insertFootnote(insertText?: string): Word.NoteItem; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: Word.GeometricShapeType, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a geometric shape in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param geometricShapeType - The geometric type of the shape to insert. - * @param insertShapeOptions - Optional. The location and size of the geometric shape. The default location and size is (0, 0, 100, 100). - */ - insertGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts HTML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param html - Required. The HTML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertHtml(html: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a picture at the specified location. - * - * @remarks - * [Api set: WordApi 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.InlinePicture; - /** - * Inserts OOXML at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param ooxml - Required. The OOXML to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertOoxml(ooxml: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a floating picture in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param base64EncodedImage - Required. The Base64-encoded image to be inserted. - * @param insertShapeOptions - Required. The location and size of the picture. The default location is (0, 0) and the default size is the image's original size. - */ - insertPictureFromBase64(base64EncodedImage: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Inserts text at the specified location. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param text - Required. Text to be inserted. - * @param insertLocation - Required. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'. - */ - insertText(text: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After"): Word.Range; - /** - * Inserts a floating text box in front of text with its anchor at the beginning of the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param text - Optional. The text to insert into the text box. - * @param insertShapeOptions - Optional. The location and size of the text box. The default location and size is (0, 0, 100, 100). - */ - insertTextBox(text?: string, insertShapeOptions?: Word.InsertShapeOptions): Word.Shape; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. Throws an `ItemNotFound` error if the two ranges aren't overlapped or adjacent. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWith(range: Word.Range): Word.Range; - /** - * Returns a new range as the intersection of this range with another range. This range isn't changed. If the two ranges aren't overlapped or adjacent, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param range - Required. Another range. - */ - intersectWithOrNullObject(range: Word.Range): Word.Range; - /** - * Removes the highlight added by the Highlight function if any. - * - * @remarks - * [Api set: WordApi 1.8] - */ - removeHighlight(): void; - /** - * Performs a search with the specified SearchOptions on the scope of the range object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects and navigates the Word UI to the range. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Splits the range into child ranges by using delimiters. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param delimiters - Required. The delimiters as an array of strings. - * @param multiParagraphs - Optional. Indicates whether a returned child range can cover multiple paragraphs. Default is false which indicates that the paragraph boundaries are also used as delimiters. - * @param trimDelimiters - Optional. Indicates whether to trim delimiters from the ranges in the range collection. Default is false which indicates that the delimiters are included in the ranges returned in the range collection. - * @param trimSpacing - Optional. Indicates whether to trim spacing characters (spaces, tabs, column breaks, and paragraph end marks) from the start and end of the ranges returned in the range collection. Default is false which indicates that spacing characters at the start and end of the ranges are included in the range collection. - */ - split(delimiters: string[], multiParagraphs?: boolean, trimDelimiters?: boolean, trimSpacing?: boolean): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeLoadOptions): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Range; - /** - * 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. - */ - track(): Word.Range; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Range; - /** - * 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's passed to it.) - * Whereas the original `Word.Range` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.RangeData; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class RangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Range[]; - /** - * Gets the first range in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Range; - /** - * Gets the first range in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Range; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.RangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.RangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.RangeCollection; - /** - * 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. - */ - track(): Word.RangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.RangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.RangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.RangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.RangeCollectionData; - } - /** - * Specifies the options to determine location and size when inserting a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface InsertShapeOptions { - /** - * Represents the height of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Represents the left position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * Represents the top position of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * Represents the width of the shape being inserted. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** - * Specifies the options to determine what to copy when inserting a file. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface InsertFileOptions { - /** - * Represents whether the change tracking mode status from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importChangeTrackingMode?: boolean; - /** - * Represents whether the custom properties from the source document should be imported. Overwrites existing properties with the same name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomProperties?: boolean; - /** - * Represents whether the custom XML parts from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.6] - */ - importCustomXmlParts?: boolean; - /** - * Represents whether to import the Different Odd and Even Pages setting for the header and footer from the source document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - importDifferentOddEvenPages?: boolean; - /** - * Represents whether the page color and other background information from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importPageColor?: boolean; - /** - * Represents whether the paragraph spacing from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importParagraphSpacing?: boolean; - /** - * Represents whether the styles from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importStyles?: boolean; - /** - * Represents whether the theme from the source document should be imported. - * - * @remarks - * [Api set: WordApi 1.5] - */ - importTheme?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SearchOptions extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SearchOptionsUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.SearchOptions): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SearchOptionsLoadOptions): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SearchOptions; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.SearchOptions; - /** - * Create a new instance of the `Word.SearchOptions` object. - */ - static newObject(context: OfficeExtension.ClientRequestContext): Word.SearchOptions; - /** - * 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's passed to it.) - * Whereas the original `Word.SearchOptions` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SearchOptionsData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SearchOptionsData; - } - /** - * Specifies the options to be included in a getText operation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface GetTextOptions { - /** - * Specifies a value that indicates whether to include hidden text in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeHiddenText?: boolean; - /** - * Specifies a value that indicates whether to include text marked as deleted in the result of the GetText method. The default value is False. - * - * @remarks - * [Api set: WordApi 1.7] - */ - includeTextMarkedAsDeleted?: boolean; - } - /** - * Specifies the options to be included in a compare document operation. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface DocumentCompareOptions { - /** - * True adds the document to the list of recently used files on the File menu. The default value is True. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - addToRecentFiles?: boolean; - /** - * The reviewer name associated with the differences generated by the comparison. - If unspecified, the value defaults to the author name of the revised document or the string "Comparison" if no author information is present. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - authorName?: string; - /** - * The target document for the comparison. Default value is 'CompareTargetCurrent'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTarget?: Word.CompareTarget | "CompareTargetCurrent" | "CompareTargetSelected" | "CompareTargetNew"; - /** - * True (default) for the comparison to include detection of format changes. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - detectFormatChanges?: boolean; - /** - * True compares the documents without notifying a user of problems. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignoreAllComparisonWarnings?: boolean; - /** - * True removes date and time stamp information from tracked changes in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removeDateAndTime?: boolean; - /** - * True removes all user information from comments, revisions, and the properties dialog box in the returned Document object. The default value is False. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - removePersonalInformation?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class Section extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - readonly body: Word.Body; - - - - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SectionUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Section): void; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's footers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of footer to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getFooter(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: Word.HeaderFooterType): Word.Body; - /** - * Gets one of the section's headers. - * - * @remarks - * [Api set: WordApi 1.1] - * - * @param type - Required. The type of header to return. This value must be: 'Primary', 'FirstPage', or 'EvenPages'. - */ - getHeader(type: "Primary" | "FirstPage" | "EvenPages"): Word.Body; - /** - * Gets the next section. Throws an `ItemNotFound` error if this section is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Section; - /** - * Gets the next section. If this section is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionLoadOptions): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Section; - /** - * 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. - */ - track(): Word.Section; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Section; - /** - * 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's passed to it.) - * Whereas the original `Word.Section` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SectionData; - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export class SectionCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Section[]; - /** - * Gets the first section in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Section; - /** - * Gets the first section in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Section; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SectionCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SectionCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SectionCollection; - /** - * 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. - */ - track(): Word.SectionCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SectionCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SectionCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SectionCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SectionCollectionData; - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class Setting extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly key: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value: any; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.SettingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Setting): void; - /** - * Deletes the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - delete(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingLoadOptions): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Setting; - /** - * 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. - */ - track(): Word.Setting; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Setting; - /** - * 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's passed to it.) - * Whereas the original `Word.Setting` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.SettingData; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export class SettingCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Setting[]; - /** - * Creates a new setting or sets an existing setting. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The setting's key, which is case-sensitive. - * @param value - Required. The setting's value. - */ - add(key: string, value: any): Word.Setting; - /** - * Deletes all settings in this add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - deleteAll(): void; - /** - * Gets the count of settings. - * - * @remarks - * [Api set: WordApi 1.4] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a setting object by its key, which is case-sensitive. Throws an `ItemNotFound` error if the setting doesn't exist. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - The key that identifies the setting object. - */ - getItem(key: string): Word.Setting; - /** - * Gets a setting object by its key, which is case-sensitive. If the setting doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param key - Required. The key that identifies the setting object. - */ - getItemOrNullObject(key: string): Word.Setting; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.SettingCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.SettingCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.SettingCollection; - /** - * 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. - */ - track(): Word.SettingCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.SettingCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.SettingCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.SettingCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.SettingCollectionData; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export class StyleCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Style[]; - /** - * Get the style object by its name. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByName(name: string): Word.Style; - /** - * If the corresponding style doesn't exist, then this method returns an object with its `isNullObject` property set to `true`. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param name - Required. The style name. - */ - getByNameOrNullObject(name: string): Word.Style; - /** - * Gets the number of the styles in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - */ - getCount(): OfficeExtension.ClientResult; - /** - * Gets a style object by its index in the collection. - * - * @remarks - * [Api set: WordApi 1.5] - * - * @param index - A number that identifies the index location of a style object. - */ - getItem(index: number): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.StyleCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.StyleCollection; - /** - * 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. - */ - track(): Word.StyleCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.StyleCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.StyleCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.StyleCollectionData; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Style extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly borders: Word.BorderCollection; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly font: Word.Font; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - readonly listTemplate: Word.ListTemplate; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly paragraphFormat: Word.ParagraphFormat; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly shading: Word.Shading; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly tableStyle: Word.TableStyle; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly builtIn: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly inUse: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly linked: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly nameLocal: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly type: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.StyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Style): void; - /** - * Deletes the style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - delete(): void; - - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.StyleLoadOptions): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Style; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Style; - /** - * 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. - */ - track(): Word.Style; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Style; - /** - * 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's passed to it.) - * Whereas the original `Word.Style` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.StyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.StyleData; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class Shading extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShadingUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shading): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShadingLoadOptions): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shading; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shading; - /** - * 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. - */ - track(): Word.Shading; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shading; - /** - * 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's passed to it.) - * Whereas the original `Word.Shading` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShadingData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShadingData; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class Table extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the collection of endnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentBody: Word.Body; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControl: Word.ContentControl; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentContentControlOrNullObject: Word.ContentControl; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCell: Word.TableCell; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableCellOrNullObject: Word.TableCell; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTableOrNullObject: Word.Table; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rows: Word.TableRowCollection; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly tables: Word.TableCollection; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isUniform: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly nestingLevel: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowCount: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Table): void; - /** - * Adds columns to the start or end of the table, using the first or last existing column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End', corresponding to the appropriate side of the table. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addColumns(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", columnCount: number, values?: string[][]): void; - /** - * Adds rows to the start or end of the table, using the first or last existing row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Start' or 'End'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - addRows(insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Autofits the table columns to the width of the window. - * - * @remarks - * [Api set: WordApi 1.3] - */ - autoFitWindow(): void; - /** - * Clears the contents of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Deletes specific columns. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param columnIndex - Required. The first column to delete. - * @param columnCount - Optional. The number of columns to delete. Default 1. - */ - deleteColumns(columnIndex: number, columnCount?: number): void; - /** - * Deletes specific rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The first row to delete. - * @param rowCount - Optional. The number of rows to delete. Default 1. - */ - deleteRows(rowIndex: number, rowCount?: number): void; - /** - * Distributes the column widths evenly. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - distributeColumns(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets the table cell at a specified row and column. Throws an `ItemNotFound` error if the specified table cell doesn't exist. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCell(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets the table cell at a specified row and column. If the specified table cell doesn't exist, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowIndex - Required. The index of the row. - * @param cellIndex - Required. The index of the cell in the row. - */ - getCellOrNullObject(rowIndex: number, cellIndex: number): Word.TableCell; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next table. Throws an `ItemNotFound` error if this table is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.Table; - /** - * Gets the next table. If this table is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.Table; - /** - * Gets the paragraph after the table. Throws an `ItemNotFound` error if there isn't a paragraph after the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfter(): Word.Paragraph; - /** - * Gets the paragraph after the table. If there isn't a paragraph after the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphAfterOrNullObject(): Word.Paragraph; - /** - * Gets the paragraph before the table. Throws an `ItemNotFound` error if there isn't a paragraph before the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBefore(): Word.Paragraph; - /** - * Gets the paragraph before the table. If there isn't a paragraph before the table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getParagraphBeforeOrNullObject(): Word.Paragraph; - /** - * Gets the range that contains this table, or the range at the start or end of the table. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rangeLocation - Optional. The range location must be 'Whole', 'Start', 'End', or 'After'. - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | Word.RangeLocation.after | "Whole" | "Start" | "End" | "After"): Word.Range; - /** - * Inserts a content control on the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts a paragraph at the specified location. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param paragraphText - Required. The paragraph text to be inserted. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - */ - insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After"): Word.Paragraph; - /** - * Inserts a table with the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param rowCount - Required. The number of rows in the table. - * @param columnCount - Required. The number of columns in the table. - * @param insertLocation - Required. The value must be 'Before' or 'After'. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertTable(rowCount: number, columnCount: number, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", values?: string[][]): Word.Table; - /** - * Merges the cells bounded inclusively by a first and last cell. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param topRow - Required. The row of the first cell - * @param firstCell - Required. The index of the first cell in its row - * @param bottomRow - Required. The row of the last cell - * @param lastCell - Required. The index of the last cell in its row - */ - mergeCells(topRow: number, firstCell: number, bottomRow: number, lastCell: number): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the table object. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the table, or the position at the start or end of the table, and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableLoadOptions): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Table; - /** - * 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. - */ - track(): Word.Table; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Table; - /** - * 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's passed to it.) - * Whereas the original `Word.Table` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableData; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TableStyle extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableStyleUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableStyle): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableStyleLoadOptions): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableStyle; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableStyle; - /** - * 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. - */ - track(): Word.TableStyle; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableStyle; - /** - * 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's passed to it.) - * Whereas the original `Word.TableStyle` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableStyleData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableStyleData; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Table[]; - /** - * Gets the first table in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.Table; - /** - * Gets the first table in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.Table; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCollection; - /** - * 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. - */ - track(): Word.TableCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCollectionData; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRow extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cells: Word.TableCellCollection; - /** - * Gets the collection of endnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly endnotes: Word.NoteItemCollection; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - readonly fields: Word.FieldCollection; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly font: Word.Font; - /** - * Gets the collection of footnotes in the table row. - * - * @remarks - * [Api set: WordApi 1.5] - */ - readonly footnotes: Word.NoteItemCollection; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellCount: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly isHeader: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableRowUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableRow): void; - /** - * Clears the contents of the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - clear(): void; - /** - * Deletes the entire row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - delete(): void; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style of the cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next row. Throws an `ItemNotFound` error if this row is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableRow; - /** - * Gets the next row. If this row is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableRow; - /** - * Inserts a content control on the row. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insertContentControl(): Word.ContentControl; - /** - * Inserts rows using this row as a template. If values are specified, inserts the values into the new rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. Where the new rows should be inserted, relative to the current row. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add - * @param values - Optional. Strings to insert in the new rows, specified as a 2D array. The number of cells in each row must not exceed the number of cells in the existing row. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Merges the row into one cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - merge(): Word.TableCell; - /** - * Performs a search with the specified SearchOptions on the scope of the row. The search results are a collection of range objects. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param searchText - Required. The search text. - * @param searchOptions - Optional. Options for the search. - */ - search(searchText: string, searchOptions?: Word.SearchOptions | { - ignorePunct?: boolean; - ignoreSpace?: boolean; - matchCase?: boolean; - matchPrefix?: boolean; - matchSuffix?: boolean; - matchWholeWord?: boolean; - matchWildcards?: boolean; - }): Word.RangeCollection; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: Word.SelectionMode): void; - /** - * Selects the row and navigates the Word UI to it. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param selectionMode - Optional. The selection mode must be 'Select', 'Start', or 'End'. 'Select' is the default. - */ - select(selectionMode?: "Select" | "Start" | "End"): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowLoadOptions): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableRow; - /** - * 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. - */ - track(): Word.TableRow; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRow; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRow` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableRowData; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableRowCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableRow[]; - /** - * Gets the first row in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableRow; - /** - * Gets the first row in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableRow; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableRowCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableRowCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableRowCollection; - /** - * 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. - */ - track(): Word.TableRowCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableRowCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableRowCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableRowCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableRowCollectionData; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCell extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly body: Word.Body; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentRow: Word.TableRow; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly parentTable: Word.Table; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly cellIndex: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly rowIndex: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - readonly width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableCellUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableCell): void; - /** - * Deletes the column containing this cell. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteColumn(): void; - /** - * Deletes the row containing this cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - deleteRow(): void; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: Word.BorderLocation): Word.TableBorder; - /** - * Gets the border style for the specified border. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param borderLocation - Required. The border location. - */ - getBorder(borderLocation: "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"): Word.TableBorder; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: Word.CellPaddingLocation): OfficeExtension.ClientResult; - /** - * Gets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - */ - getCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right"): OfficeExtension.ClientResult; - /** - * Gets the next cell. Throws an `ItemNotFound` error if this cell is the last one. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNext(): Word.TableCell; - /** - * Gets the next cell. If this cell is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getNextOrNullObject(): Word.TableCell; - /** - * Adds columns to the left or right of the cell, using the cell's column as a template. This is applicable to uniform tables. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param columnCount - Required. Number of columns to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertColumns(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", columnCount: number, values?: string[][]): void; - /** - * Inserts rows above or below the cell, using the cell's row as a template. The string values, if specified, are set in the newly inserted rows. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param insertLocation - Required. It must be 'Before' or 'After'. - * @param rowCount - Required. Number of rows to add. - * @param values - Optional 2D array. Cells are filled if the corresponding strings are specified in the array. - */ - insertRows(insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After", rowCount: number, values?: string[][]): Word.TableRowCollection; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: Word.CellPaddingLocation, cellPadding: number): void; - /** - * Sets cell padding in points. - * - * @remarks - * [Api set: WordApi 1.3] - * - * @param cellPaddingLocation - Required. The cell padding location must be 'Top', 'Left', 'Bottom', or 'Right'. - * @param cellPadding - Required. The cell padding. - */ - setCellPadding(cellPaddingLocation: "Top" | "Left" | "Bottom" | "Right", cellPadding: number): void; - /** - * Splits the cell into the specified number of rows and columns. - * - * @remarks - * [Api set: WordApi 1.4] - * - * @param rowCount - Required. The number of rows to split into. Must be a divisor of the number of underlying rows. - * @param columnCount - Required. The number of columns to split into. - */ - split(rowCount: number, columnCount: number): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellLoadOptions): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableCell; - /** - * 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. - */ - track(): Word.TableCell; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCell; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCell` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableCellData; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableCellCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TableCell[]; - /** - * Gets the first table cell in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirst(): Word.TableCell; - /** - * Gets the first table cell in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - getFirstOrNullObject(): Word.TableCell; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableCellCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableCellCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TableCellCollection; - /** - * 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. - */ - track(): Word.TableCellCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableCellCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TableCellCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableCellCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TableCellCollectionData; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export class TableBorder extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TableBorderUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TableBorder): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TableBorderLoadOptions): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TableBorder; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TableBorder; - /** - * 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. - */ - track(): Word.TableBorder; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TableBorder; - /** - * 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's passed to it.) - * Whereas the original `Word.TableBorder` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TableBorderData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TableBorderData; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChange extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly author: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly date: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly text: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - readonly type: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - /** - * Accepts the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - accept(): void; - /** - * Gets the next tracked change. Throws an `ItemNotFound` error if this tracked change is the last one. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNext(): Word.TrackedChange; - /** - * Gets the next tracked change. If this tracked change is the last one, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getNextOrNullObject(): Word.TrackedChange; - /** - * Gets the range of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getRange(rangeLocation?: Word.RangeLocation.whole | Word.RangeLocation.start | Word.RangeLocation.end | "Whole" | "Start" | "End"): Word.Range; - /** - * Rejects the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - reject(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeLoadOptions): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChange; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TrackedChange; - /** - * 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. - */ - track(): Word.TrackedChange; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChange; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChange` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TrackedChangeData; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export class TrackedChangeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.TrackedChange[]; - /** - * Accepts all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - acceptAll(): void; - /** - * Gets the first TrackedChange in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirst(): Word.TrackedChange; - /** - * Gets the first TrackedChange in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.6] - */ - getFirstOrNullObject(): Word.TrackedChange; - /** - * Rejects all the tracked changes in the collection. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rejectAll(): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TrackedChangeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TrackedChangeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.TrackedChangeCollection; - /** - * 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. - */ - track(): Word.TrackedChangeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TrackedChangeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.TrackedChangeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TrackedChangeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.TrackedChangeCollectionData; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Shape extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly body: Word.Body; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly canvas: Word.Canvas; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly fill: Word.ShapeFill; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentCanvas: Word.Shape; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly parentGroup: Word.Shape; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapeGroup: Word.ShapeGroup; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textFrame: Word.TextFrame; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly textWrap: Word.ShapeTextWrap; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly isChild: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Shape): void; - /** - * Deletes the shape and its content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - delete(): void; - /** - * Moves the shape horizontally by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved horizontally, in points. Use a positive value to move the shape right. Use a negative value to move the shape left. - */ - moveHorizontally(distance: number): void; - /** - * Moves the shape vertically by the number of points. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param distance - Required. Specifies how far the shape is to be moved vertically, in points. Use a positive value to move the shape up. Use a negative value to move the shape down. - */ - moveVertically(distance: number): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the height of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the height of the shape after you resize it and the current or original height. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleHeight(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: Word.ShapeScaleType, scaleFrom?: Word.ShapeScaleFrom): void; - /** - * Scales the width of the shape by a specified factor. For images, you can indicate whether you want to scale the shape relative to the original or the current size. Shapes other than pictures are always scaled relative to their current height. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param scaleFactor - Specifies the ratio between the width of the shape after you resize it and the current or original width. - * @param scaleType - Specifies whether the shape is scaled relative to its original or current size. The original size scaling option only works for images. - * @param scaleFrom - Optional. Specifies which part of the shape retains its position when the shape is scaled. If omitted, it represents that the shape's upper left corner retains its position. - */ - scaleWidth(scaleFactor: number, scaleType: "CurrentSize" | "OriginalSize", scaleFrom?: "ScaleFromTopLeft" | "ScaleFromMiddle" | "ScaleFromBottomRight"): void; - /** - * Selects the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param selectMultipleShapes - Optional. Whether to select multiple floating shapes. The default value is false. - */ - select(selectMultipleShapes?: boolean): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeLoadOptions): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Shape; - /** - * 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. - */ - track(): Word.Shape; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Shape; - /** - * 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's passed to it.) - * Whereas the original `Word.Shape` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeData; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeGroup extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeGroupUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeGroup): void; - /** - * Ungroups any grouped shapes in the specified shape group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ungroup(): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeGroupLoadOptions): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeGroup; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeGroup; - /** - * 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. - */ - track(): Word.ShapeGroup; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeGroup; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeGroup` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeGroupData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeGroupData; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class Canvas extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shape: Word.Shape; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly shapes: Word.ShapeCollection; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly id: number; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.CanvasUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.Canvas): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.CanvasLoadOptions): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.Canvas; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.Canvas; - /** - * 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. - */ - track(): Word.Canvas; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.Canvas; - /** - * 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's passed to it.) - * Whereas the original `Word.Canvas` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.CanvasData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.CanvasData; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeCollection extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** Gets the loaded child items in this collection. */ - readonly items: Word.Shape[]; - /** - * Gets the shapes that have the specified geometric types. Only applied to geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of geometric shape subtypes. - */ - getByGeometricTypes(types: Word.GeometricShapeType[]): Word.ShapeCollection; - /** - * Gets a shape by its identifier. Throws an `ItemNotFound` error if there isn't a shape with the identifier in this collection. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getById(id: number): Word.Shape; - /** - * Gets a shape by its identifier. If there isn't a shape with the identifier in this collection, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param id - Required. A shape identifier. - */ - getByIdOrNullObject(id: number): Word.Shape; - /** - * Gets the shapes by the identifiers. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param ids - Required. An array of shape identifiers. - */ - getByIds(ids: number[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified names. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param names - Required. An array of shape names. - */ - getByNames(names: string[]): Word.ShapeCollection; - /** - * Gets the shapes that have the specified types. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param types - Required. An array of shape types. - */ - getByTypes(types: Word.ShapeType[]): Word.ShapeCollection; - /** - * Gets the first shape in this collection. Throws an `ItemNotFound` error if this collection is empty. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirst(): Word.Shape; - /** - * Gets the first shape in this collection. If this collection is empty, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - getFirstOrNullObject(): Word.Shape; - /** - * Groups floating shapes in this collection, inline shapes will be skipped. Returns a Shape object that represents the new group of shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group(): Word.Shape; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeCollectionLoadOptions & Word.Interfaces.CollectionLoadOptions): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeCollection; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: OfficeExtension.LoadOption): Word.ShapeCollection; - /** - * 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. - */ - track(): Word.ShapeCollection; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeCollection; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeCollection` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeCollectionData`) that contains an "items" array with shallow copies of any loaded properties from the collection's items. - */ - toJSON(): Word.Interfaces.ShapeCollectionData; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeFill extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly type: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeFillUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeFill): void; - /** - * Clears the fill formatting of this shape and set it to `Word.ShapeFillType.NoFill`; - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - clear(): void; - /** - * Sets the fill formatting of the shape to a uniform color. This changes the fill type to `Word.ShapeFillType.Solid`. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - * - * @param color - A string that represents the fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - */ - setSolidColor(color: string): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeFillLoadOptions): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeFill; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeFill; - /** - * 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. - */ - track(): Word.ShapeFill; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeFill; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeFill` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeFillData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeFillData; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class TextFrame extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - readonly hasText: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap: boolean; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.TextFrameUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.TextFrame): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.TextFrameLoadOptions): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.TextFrame; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.TextFrame; - /** - * 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. - */ - track(): Word.TextFrame; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.TextFrame; - /** - * 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's passed to it.) - * Whereas the original `Word.TextFrame` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.TextFrameData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.TextFrameData; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export class ShapeTextWrap extends OfficeExtension.ClientObject { - /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */ - context: RequestContext; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - /** - * 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. - * @param properties - A JavaScript object with properties that are structured isomorphically to the properties of the object on which the method is called. - * @param options - Provides an option to suppress errors if the properties object tries to set any read-only properties. - */ - set(properties: Interfaces.ShapeTextWrapUpdateData, options?: OfficeExtension.UpdateOptions): void; - /** Sets multiple properties on the object at the same time, based on an existing loaded object. */ - set(properties: Word.ShapeTextWrap): void; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param options - Provides options for which properties of the object to load. - */ - load(options?: Word.Interfaces.ShapeTextWrapLoadOptions): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @param propertyNames - A comma-delimited string or an array of strings that specify the properties to load. - */ - load(propertyNames?: string | string[]): Word.ShapeTextWrap; - /** - * Queues up a command to load the specified properties of the object. You must call `context.sync()` before reading the properties. - * - * @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. - */ - load(propertyNamesAndPaths?: { - select?: string; - expand?: string; - }): Word.ShapeTextWrap; - /** - * 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. - */ - track(): Word.ShapeTextWrap; - /** - * 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'll need to call `context.sync()` before the memory release takes effect. - */ - untrack(): Word.ShapeTextWrap; - /** - * 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's passed to it.) - * Whereas the original `Word.ShapeTextWrap` object is an API object, the `toJSON` method returns a plain JavaScript object (typed as `Word.Interfaces.ShapeTextWrapData`) that contains shallow copies of any loaded child properties from the original object. - */ - toJSON(): Word.Interfaces.ShapeTextWrapData; - } - - - - - - - - - - - - - - - /** - * Represents the possible change tracking modes. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingMode { - /** - * ChangeTracking is turned off. - * @remarks - * [Api set: WordApi 1.4] - */ - off = "Off", - /** - * ChangeTracking is turned on for everyone. - * @remarks - * [Api set: WordApi 1.4] - */ - trackAll = "TrackAll", - /** - * Tracking is turned on for my changes only. - * @remarks - * [Api set: WordApi 1.4] - */ - trackMineOnly = "TrackMineOnly", - } - /** - * Specify the current version or the original version of the text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - enum ChangeTrackingVersion { - /** - * @remarks - * [Api set: WordApi 1.4] - */ - original = "Original", - /** - * @remarks - * [Api set: WordApi 1.4] - */ - current = "Current", - } - /** - * Specify the track state when ChangeTracking is on. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum ChangeTrackingState { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - added = "Added", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - deleted = "Deleted", - } - /** - * TrackedChange type. - * - * @remarks - * [Api set: WordApi 1.6] - */ - enum TrackedChangeType { - /** - * No revision. - * @remarks - * [Api set: WordApi 1.6] - */ - none = "None", - /** - * Add change. - * @remarks - * [Api set: WordApi 1.6] - */ - added = "Added", - /** - * Delete change. - * @remarks - * [Api set: WordApi 1.6] - */ - deleted = "Deleted", - /** - * Format change. - * @remarks - * [Api set: WordApi 1.6] - */ - formatted = "Formatted", - } - /** - * Note item type - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum NoteItemType { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - } - /** - * Provides information about the type of a raised event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventType { - /** - * ContentControlDeleted represents the event that the content control has been deleted. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDeleted = "ContentControlDeleted", - /** - * ContentControlSelectionChanged represents the event that the selection in the content control has been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlSelectionChanged = "ContentControlSelectionChanged", - /** - * ContentControlDataChanged represents the event that the data in the content control have been changed. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlDataChanged = "ContentControlDataChanged", - /** - * ContentControlAdded represents the event a content control has been added to the document. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlAdded = "ContentControlAdded", - /** - * Represents that a content control has been entered. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlEntered = "ContentControlEntered", - /** - * Represents that a content control has been exited. - * @remarks - * [Api set: WordApi 1.5] - */ - contentControlExited = "ContentControlExited", - /** - * Represents that one or more new paragraphs were added. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphAdded = "ParagraphAdded", - /** - * Represents that one or more paragraphs were changed. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphChanged = "ParagraphChanged", - /** - * Represents that one or more paragraphs were deleted. - * @remarks - * [Api set: WordApi 1.6] - */ - paragraphDeleted = "ParagraphDeleted", - /** - * Represents that an annotation was clicked (or selected with **Alt+Down**) in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationClicked = "AnnotationClicked", - /** - * Represents that an annotation was hovered over in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationHovered = "AnnotationHovered", - /** - * Represents that one or more annotations were added in the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationInserted = "AnnotationInserted", - /** - * Represents that one or more annotations were deleted from the document. - * @remarks - * [Api set: WordApi 1.7] - */ - annotationRemoved = "AnnotationRemoved", - /** - * Represents an action in the annotation pop-up. - * @remarks - * [Api set: WordApi 1.8] - */ - annotationPopupAction = "AnnotationPopupAction", - } - /** - * An enum that specifies an event's source. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum EventSource { - /** - * @remarks - * [Api set: WordApi 1.5] - */ - local = "Local", - /** - * @remarks - * [Api set: WordApi 1.5] - */ - remote = "Remote", - } - /** - * Provides information about the content control that raised contentControlAdded event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlAddedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDataChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDataChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlDeleted event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlDeletedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlEntered event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlEnteredEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlExited event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlExitedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the content control that raised contentControlSelectionChanged event. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ContentControlSelectionChangedEventArgs { - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.5] - */ - eventType: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the content control IDs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - ids: number[]; - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.5] - */ - source: Word.EventSource | "Local" | "Remote"; - } - /** - * Provides information about the paragraphs that raised the paragraphAdded event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphAddedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphChanged event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphChangedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Provides information about the paragraphs that raised the paragraphDeleted event. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ParagraphDeletedEventArgs { - /** - * The source of the event. It can be local or remote (through coauthoring). - * - * @remarks - * [Api set: WordApi 1.6] - */ - source: Word.EventSource | "Local" | "Remote"; - /** - * The event type. See Word.EventType for details. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type: Word.EventType | "ContentControlDeleted" | "ContentControlSelectionChanged" | "ContentControlDataChanged" | "ContentControlAdded" | "ContentControlEntered" | "ContentControlExited" | "ParagraphAdded" | "ParagraphChanged" | "ParagraphDeleted" | "AnnotationClicked" | "AnnotationHovered" | "AnnotationInserted" | "AnnotationRemoved" | "AnnotationPopupAction"; - /** - * Gets the unique IDs of the involved paragraphs. IDs are in standard 8-4-4-4-12 GUID format without curly braces and differ across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalIds: string[]; - } - /** - * Specifies supported content control types and subtypes. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum ContentControlType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextInline = "RichTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - richTextParagraphs = "RichTextParagraphs", - /** - * Contains a whole cell. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableCell = "RichTextTableCell", - /** - * Contains a whole row. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTableRow = "RichTextTableRow", - /** - * Contains a whole table. - * @remarks - * [Api set: WordApi 1.1] - */ - richTextTable = "RichTextTable", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextInline = "PlainTextInline", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainTextParagraph = "PlainTextParagraph", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - picture = "Picture", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - buildingBlockGallery = "BuildingBlockGallery", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - checkBox = "CheckBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - comboBox = "ComboBox", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dropDownList = "DropDownList", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - datePicker = "DatePicker", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - repeatingSection = "RepeatingSection", - /** - * Identifies a rich text content control. - * @remarks - * [Api set: WordApi 1.1] - */ - richText = "RichText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - plainText = "PlainText", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - group = "Group", - } - /** - * ContentControl appearance. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Content control appearance options are BoundingBox, Tags, or Hidden. - */ - enum ContentControlAppearance { - /** - * Represents a content control shown as a shaded rectangle or bounding box (with optional title). - * @remarks - * [Api set: WordApi 1.1] - */ - boundingBox = "BoundingBox", - /** - * Represents a content control shown as start and end markers. - * @remarks - * [Api set: WordApi 1.1] - */ - tags = "Tags", - /** - * Represents a content control that isn't shown. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - } - - /** - * The supported styles for underline format. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum UnderlineType { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * No underline. - * @remarks - * [Api set: WordApi 1.1] - */ - none = "None", - /** - * Warning: hidden has been deprecated. - * @deprecated Hidden is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - hidden = "Hidden", - /** - * Warning: dotLine has been deprecated. - * @deprecated DotLine is no longer supported. - * @remarks - * [Api set: WordApi 1.1] - */ - dotLine = "DotLine", - /** - * A single underline. This is the default value. - * @remarks - * [Api set: WordApi 1.1] - */ - single = "Single", - /** - * Only underline individual words. - * @remarks - * [Api set: WordApi 1.1] - */ - word = "Word", - /** - * A double underline. - * @remarks - * [Api set: WordApi 1.1] - */ - double = "Double", - /** - * A single thick underline. - * @remarks - * [Api set: WordApi 1.1] - */ - thick = "Thick", - /** - * A dotted underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dottedHeavy = "DottedHeavy", - /** - * A single dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dashLine = "DashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineHeavy = "DashLineHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLong = "DashLineLong", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dashLineLongHeavy = "DashLineLongHeavy", - /** - * An alternating dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLine = "DotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - dotDashLineHeavy = "DotDashLineHeavy", - /** - * An alternating dot-dot-dash underline. - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLine = "TwoDotDashLine", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - twoDotDashLineHeavy = "TwoDotDashLineHeavy", - /** - * A single wavy underline. - * @remarks - * [Api set: WordApi 1.1] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveHeavy = "WaveHeavy", - /** - * @remarks - * [Api set: WordApi 1.1] - */ - waveDouble = "WaveDouble", - } - /** - * Specifies the form of a break. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum BreakType { - /** - * Page break at the insertion point. - * @remarks - * [Api set: WordApi 1.1] - */ - page = "Page", - /** - * Warning: next has been deprecated. Use sectionNext instead. - * @deprecated Use sectionNext instead. - * @remarks - * [Api set: WordApi 1.1] - */ - next = "Next", - /** - * Section break on next page. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionNext = "SectionNext", - /** - * New section without a corresponding page break. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionContinuous = "SectionContinuous", - /** - * Section break with the next section beginning on the next even-numbered page. If the section break falls on an even-numbered page, Word leaves the next odd-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionEven = "SectionEven", - /** - * Section break with the next section beginning on the next odd-numbered page. If the section break falls on an odd-numbered page, Word leaves the next even-numbered page blank. - * @remarks - * [Api set: WordApi 1.1] - */ - sectionOdd = "SectionOdd", - /** - * Line break. - * @remarks - * [Api set: WordApi 1.1] - */ - line = "Line", - } - /** - * The insertion location types. - * - * @remarks - * [Api set: WordApi 1.1] - * - * To be used with an API call, such as `obj.insertSomething(newStuff, location);`. - * If the location is "Before" or "After", the new content will be outside of the modified object. - * If the location is "Start" or "End", the new content will be included as part of the modified object. - */ - enum InsertLocation { - /** - * Add content before the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - before = "Before", - /** - * Add content after the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - after = "After", - /** - * Prepend content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * Append content to the contents of the calling object. - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - /** - * Replace the contents of the current object. - * @remarks - * [Api set: WordApi 1.1] - */ - replace = "Replace", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum Alignment { - /** - * @remarks - * [Api set: WordApi 1.1] - */ - mixed = "Mixed", - /** - * Unknown alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - unknown = "Unknown", - /** - * Alignment to the left. - * @remarks - * [Api set: WordApi 1.1] - */ - left = "Left", - /** - * Alignment to the center. - * @remarks - * [Api set: WordApi 1.1] - */ - centered = "Centered", - /** - * Alignment to the right. - * @remarks - * [Api set: WordApi 1.1] - */ - right = "Right", - /** - * Fully justified alignment. - * @remarks - * [Api set: WordApi 1.1] - */ - justified = "Justified", - } - /** - * @remarks - * [Api set: WordApi 1.1] - */ - enum HeaderFooterType { - /** - * Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. - * @remarks - * [Api set: WordApi 1.1] - */ - primary = "Primary", - /** - * Returns the header or footer on the first page of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - firstPage = "FirstPage", - /** - * Returns all headers or footers on even-numbered pages of a section. - * @remarks - * [Api set: WordApi 1.1] - */ - evenPages = "EvenPages", - } - /** - * Represents the types of body objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum BodyType { - /** - * Unknown body type. - * @remarks - * [Api set: WordApi 1.3] - */ - unknown = "Unknown", - /** - * Main document body. - * @remarks - * [Api set: WordApi 1.3] - */ - mainDoc = "MainDoc", - /** - * Section body. - * @remarks - * [Api set: WordApi 1.3] - */ - section = "Section", - /** - * Header body. - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * Footer body. - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * Table cell body. - * @remarks - * [Api set: WordApi 1.3] - */ - tableCell = "TableCell", - /** - * Footnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - footnote = "Footnote", - /** - * Endnote body. - * @remarks - * [Api set: WordApi 1.5] - */ - endnote = "Endnote", - /** - * Note body e.g., endnote, footnote. - * @remarks - * [Api set: WordApi 1.5] - */ - noteItem = "NoteItem", - } - /** - * This enum sets where the cursor (insertion point) in the document is after a selection. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SelectionMode { - /** - * The entire range is selected. - * @remarks - * [Api set: WordApi 1.1] - */ - select = "Select", - /** - * The cursor is at the beginning of the selection (just before the start of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - start = "Start", - /** - * The cursor is at the end of the selection (just after the end of the selected range). - * @remarks - * [Api set: WordApi 1.1] - */ - end = "End", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImageFormat { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - unsupported = "Unsupported", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - undefined = "Undefined", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bmp = "Bmp", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - jpeg = "Jpeg", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gif = "Gif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tiff = "Tiff", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - png = "Png", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - icon = "Icon", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - exif = "Exif", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - wmf = "Wmf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - emf = "Emf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pict = "Pict", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pdf = "Pdf", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - svg = "Svg", - } - /** - * Represents the location of a range. You can get range by calling getRange on different objects such as {@link Word.Paragraph} and {@link Word.ContentControl}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - enum RangeLocation { - /** - * The object's whole range. If the object is a paragraph content control or table content control, the EOP or Table characters after the content control are also included. - * @remarks - * [Api set: WordApi 1.3] - */ - whole = "Whole", - /** - * The starting point of the object. For content control, it's the point after the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - start = "Start", - /** - * The ending point of the object. For paragraph, it's the point before the EOP (end of paragraph). For content control, it's the point before the closing tag. - * @remarks - * [Api set: WordApi 1.3] - */ - end = "End", - /** - * For content control only. It's the point before the opening tag. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * The point after the object. If the object is a paragraph content control or table content control, it's the point after the EOP or Table characters. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - /** - * The range between 'Start' and 'End'. - * @remarks - * [Api set: WordApi 1.3] - */ - content = "Content", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum LocationRelation { - /** - * Indicates that this instance and the range are in different sub-documents. - * @remarks - * [Api set: WordApi 1.3] - */ - unrelated = "Unrelated", - /** - * Indicates that this instance and the range represent the same range. - * @remarks - * [Api set: WordApi 1.3] - */ - equal = "Equal", - /** - * Indicates that this instance contains the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsStart = "ContainsStart", - /** - * Indicates that this instance contains the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - containsEnd = "ContainsEnd", - /** - * Indicates that this instance contains the range, with the exception of the start and end character of this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - contains = "Contains", - /** - * Indicates that this instance is inside the range and that it shares the same start character. The range doesn't share the same end character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideStart = "InsideStart", - /** - * Indicates that this instance is inside the range and that it shares the same end character. The range doesn't share the same start character as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - insideEnd = "InsideEnd", - /** - * Indicates that this instance is inside the range. The range doesn't share the same start and end characters as this instance. - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * Indicates that this instance occurs before, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentBefore = "AdjacentBefore", - /** - * Indicates that this instance starts before the range and overlaps the range's first character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsBefore = "OverlapsBefore", - /** - * Indicates that this instance occurs before the range. - * @remarks - * [Api set: WordApi 1.3] - */ - before = "Before", - /** - * Indicates that this instance occurs after, and is adjacent to, the range. - * @remarks - * [Api set: WordApi 1.3] - */ - adjacentAfter = "AdjacentAfter", - /** - * Indicates that this instance starts inside the range and overlaps the range’s last character. - * @remarks - * [Api set: WordApi 1.3] - */ - overlapsAfter = "OverlapsAfter", - /** - * Indicates that this instance occurs after the range. - * @remarks - * [Api set: WordApi 1.3] - */ - after = "After", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideHorizontal = "InsideHorizontal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - insideVertical = "InsideVertical", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - inside = "Inside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - outside = "Outside", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - all = "All", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum CellPaddingLocation { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - left = "Left", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - right = "Right", - } - /** - * Represents the width of a style's border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum BorderWidth { - /** - * None width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * 0.25 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt025 = "Pt025", - /** - * 0.50 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt050 = "Pt050", - /** - * 0.75 point. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt075 = "Pt075", - /** - * 1.00 point. This is the default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt100 = "Pt100", - /** - * 1.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt150 = "Pt150", - /** - * 2.25 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt225 = "Pt225", - /** - * 3.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt300 = "Pt300", - /** - * 4.50 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt450 = "Pt450", - /** - * 6.00 points. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pt600 = "Pt600", - /** - * Mixed width. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - mixed = "Mixed", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum BorderType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - single = "Single", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - double = "Double", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotted = "Dotted", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashed = "Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dotDashed = "DotDashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dot2Dashed = "Dot2Dashed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - triple = "Triple", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickSmall = "ThinThickSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinSmall = "ThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinSmall = "ThinThickThinSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickMed = "ThinThickMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinMed = "ThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinMed = "ThinThickThinMed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickLarge = "ThinThickLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thickThinLarge = "ThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - thinThickThinLarge = "ThinThickThinLarge", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - wave = "Wave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - doubleWave = "DoubleWave", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashedSmall = "DashedSmall", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - dashDotStroked = "DashDotStroked", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEmboss = "ThreeDEmboss", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - threeDEngrave = "ThreeDEngrave", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum VerticalAlignment { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - mixed = "Mixed", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - top = "Top", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - center = "Center", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bottom = "Bottom", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListLevelType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - picture = "Picture", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListBullet { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - custom = "Custom", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - solid = "Solid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hollow = "Hollow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - square = "Square", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - diamonds = "Diamonds", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arrow = "Arrow", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - checkmark = "Checkmark", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum ListNumbering { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - none = "None", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - lowerLetter = "LowerLetter", - } - /** - * Represents the built-in style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - * - * Important: This enum was renamed from `Style` to `BuiltInStyleName` in WordApi 1.5. - */ - enum BuiltInStyleName { - /** - * Mixed styles or other style not in this list. - * @remarks - * [Api set: WordApi 1.3] - */ - other = "Other", - /** - * Reset character and paragraph style to default. - * @remarks - * [Api set: WordApi 1.3] - */ - normal = "Normal", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading1 = "Heading1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading2 = "Heading2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading3 = "Heading3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading4 = "Heading4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading5 = "Heading5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading6 = "Heading6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading7 = "Heading7", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading8 = "Heading8", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - heading9 = "Heading9", - /** - * Table-of-content level 1. - * @remarks - * [Api set: WordApi 1.3] - */ - toc1 = "Toc1", - /** - * Table-of-content level 2. - * @remarks - * [Api set: WordApi 1.3] - */ - toc2 = "Toc2", - /** - * Table-of-content level 3. - * @remarks - * [Api set: WordApi 1.3] - */ - toc3 = "Toc3", - /** - * Table-of-content level 4. - * @remarks - * [Api set: WordApi 1.3] - */ - toc4 = "Toc4", - /** - * Table-of-content level 5. - * @remarks - * [Api set: WordApi 1.3] - */ - toc5 = "Toc5", - /** - * Table-of-content level 6. - * @remarks - * [Api set: WordApi 1.3] - */ - toc6 = "Toc6", - /** - * Table-of-content level 7. - * @remarks - * [Api set: WordApi 1.3] - */ - toc7 = "Toc7", - /** - * Table-of-content level 8. - * @remarks - * [Api set: WordApi 1.3] - */ - toc8 = "Toc8", - /** - * Table-of-content level 9. - * @remarks - * [Api set: WordApi 1.3] - */ - toc9 = "Toc9", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteText = "FootnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - header = "Header", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footer = "Footer", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - caption = "Caption", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - footnoteReference = "FootnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteReference = "EndnoteReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - endnoteText = "EndnoteText", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - title = "Title", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtitle = "Subtitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink = "Hyperlink", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - strong = "Strong", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - emphasis = "Emphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - noSpacing = "NoSpacing", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listParagraph = "ListParagraph", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - quote = "Quote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseQuote = "IntenseQuote", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleEmphasis = "SubtleEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseEmphasis = "IntenseEmphasis", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - subtleReference = "SubtleReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - intenseReference = "IntenseReference", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bookTitle = "BookTitle", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - bibliography = "Bibliography", - /** - * Table-of-content heading. - * @remarks - * [Api set: WordApi 1.3] - */ - tocHeading = "TocHeading", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGrid = "TableGrid", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable1 = "PlainTable1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable2 = "PlainTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable3 = "PlainTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable4 = "PlainTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - plainTable5 = "PlainTable5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - tableGridLight = "TableGridLight", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light = "GridTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent1 = "GridTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent2 = "GridTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent3 = "GridTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent4 = "GridTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent5 = "GridTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable1Light_Accent6 = "GridTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2 = "GridTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent1 = "GridTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent2 = "GridTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent3 = "GridTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent4 = "GridTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent5 = "GridTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable2_Accent6 = "GridTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3 = "GridTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent1 = "GridTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent2 = "GridTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent3 = "GridTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent4 = "GridTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent5 = "GridTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable3_Accent6 = "GridTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4 = "GridTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent1 = "GridTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent2 = "GridTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent3 = "GridTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent4 = "GridTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent5 = "GridTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable4_Accent6 = "GridTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark = "GridTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent1 = "GridTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent2 = "GridTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent3 = "GridTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent4 = "GridTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent5 = "GridTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable5Dark_Accent6 = "GridTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful = "GridTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent1 = "GridTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent2 = "GridTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent3 = "GridTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent4 = "GridTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent5 = "GridTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable6Colorful_Accent6 = "GridTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful = "GridTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent1 = "GridTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent2 = "GridTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent3 = "GridTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent4 = "GridTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent5 = "GridTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - gridTable7Colorful_Accent6 = "GridTable7Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light = "ListTable1Light", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent1 = "ListTable1Light_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent2 = "ListTable1Light_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent3 = "ListTable1Light_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent4 = "ListTable1Light_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent5 = "ListTable1Light_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable1Light_Accent6 = "ListTable1Light_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2 = "ListTable2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent1 = "ListTable2_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent2 = "ListTable2_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent3 = "ListTable2_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent4 = "ListTable2_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent5 = "ListTable2_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable2_Accent6 = "ListTable2_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3 = "ListTable3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent1 = "ListTable3_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent2 = "ListTable3_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent3 = "ListTable3_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent4 = "ListTable3_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent5 = "ListTable3_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable3_Accent6 = "ListTable3_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4 = "ListTable4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent1 = "ListTable4_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent2 = "ListTable4_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent3 = "ListTable4_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent4 = "ListTable4_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent5 = "ListTable4_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable4_Accent6 = "ListTable4_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark = "ListTable5Dark", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent1 = "ListTable5Dark_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent2 = "ListTable5Dark_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent3 = "ListTable5Dark_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent4 = "ListTable5Dark_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent5 = "ListTable5Dark_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable5Dark_Accent6 = "ListTable5Dark_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful = "ListTable6Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent1 = "ListTable6Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent2 = "ListTable6Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent3 = "ListTable6Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent4 = "ListTable6Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent5 = "ListTable6Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable6Colorful_Accent6 = "ListTable6Colorful_Accent6", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful = "ListTable7Colorful", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent1 = "ListTable7Colorful_Accent1", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent2 = "ListTable7Colorful_Accent2", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent3 = "ListTable7Colorful_Accent3", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent4 = "ListTable7Colorful_Accent4", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent5 = "ListTable7Colorful_Accent5", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - listTable7Colorful_Accent6 = "ListTable7Colorful_Accent6", - } - /** - * @remarks - * [Api set: WordApi 1.3] - */ - enum DocumentPropertyType { - /** - * @remarks - * [Api set: WordApi 1.3] - */ - string = "String", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - number = "Number", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - date = "Date", - /** - * @remarks - * [Api set: WordApi 1.3] - */ - boolean = "Boolean", - } - /** - * Represents the type of style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum StyleType { - /** - * Represents that the style is a character style. - * @remarks - * [Api set: WordApi 1.5] - */ - character = "Character", - /** - * Represents that the style is a list style. Currently supported on desktop. - * @remarks - * [Api set: WordApi 1.5] - */ - list = "List", - /** - * Represents that the style is a paragraph style. - * @remarks - * [Api set: WordApi 1.5] - */ - paragraph = "Paragraph", - /** - * Represents that the style is a table style. - * @remarks - * [Api set: WordApi 1.5] - */ - table = "Table", - } - /** - * Represents the outline levels. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum OutlineLevel { - /** - * Represents outline level 1. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel1 = "OutlineLevel1", - /** - * Represents outline level 2. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel2 = "OutlineLevel2", - /** - * Represents outline level 3. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel3 = "OutlineLevel3", - /** - * Represents outline level 4. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel4 = "OutlineLevel4", - /** - * Represents outline level 5. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel5 = "OutlineLevel5", - /** - * Represents outline level 6. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel6 = "OutlineLevel6", - /** - * Represents outline level 7. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel7 = "OutlineLevel7", - /** - * Represents outline level 8. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel8 = "OutlineLevel8", - /** - * Represents outline level 9. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel9 = "OutlineLevel9", - /** - * Represents outline level body text, not an outline level. - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevelBodyText = "OutlineLevelBodyText", - } - /** - * Specifies the close behavior for `Document.close`. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum CloseBehavior { - /** - * Saves the changes before closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - save = "Save", - /** - * Discard the possible changes when closing the document. - * @remarks - * [Api set: WordApi 1.5] - */ - skipSave = "SkipSave", - } - /** - * Specifies the save behavior for `Document.save`. - * - * @remarks - * [Api set: WordApi 1.1] - */ - enum SaveBehavior { - /** - * Saves the document without prompting the user. If it's a new document, - it will be saved with the default name or specified name in the default location. - * @remarks - * [Api set: WordApi 1.1] - */ - save = "Save", - /** - * Displays the "Save As" dialog to the user if the document hasn't been saved. - Won't take effect if the document was previously saved. - * @remarks - * [Api set: WordApi 1.1] - */ - prompt = "Prompt", - } - /** - * Represents the type of Field. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldType { - /** - * Represents that the field type is Add-in. - * @remarks - * [Api set: WordApi 1.5] - */ - addin = "Addin", - /** - * Represents that the field type is AddressBlock. - * @remarks - * [Api set: WordApi 1.5] - */ - addressBlock = "AddressBlock", - /** - * Represents that the field type is Advance. - * @remarks - * [Api set: WordApi 1.5] - */ - advance = "Advance", - /** - * Represents that the field type is Ask. - * @remarks - * [Api set: WordApi 1.5] - */ - ask = "Ask", - /** - * Represents that the field type is Author. - * @remarks - * [Api set: WordApi 1.5] - */ - author = "Author", - /** - * Represents that the field type is AutoText. - * @remarks - * [Api set: WordApi 1.5] - */ - autoText = "AutoText", - /** - * Represents that the field type is AutoTextList. - * @remarks - * [Api set: WordApi 1.5] - */ - autoTextList = "AutoTextList", - /** - * Represents that the field type is Barcode. - * @remarks - * [Api set: WordApi 1.5] - */ - barCode = "BarCode", - /** - * Represents that the field type is Bibliography. - * @remarks - * [Api set: WordApi 1.5] - */ - bibliography = "Bibliography", - /** - * Represents that the field type is BidiOutline. - * @remarks - * [Api set: WordApi 1.5] - */ - bidiOutline = "BidiOutline", - /** - * Represents that the field type is Citation. - * @remarks - * [Api set: WordApi 1.5] - */ - citation = "Citation", - /** - * Represents that the field type is Comments. - * @remarks - * [Api set: WordApi 1.5] - */ - comments = "Comments", - /** - * Represents that the field type is Compare. - * @remarks - * [Api set: WordApi 1.5] - */ - compare = "Compare", - /** - * Represents that the field type is CreateDate. - * @remarks - * [Api set: WordApi 1.5] - */ - createDate = "CreateDate", - /** - * Represents that the field type is Data. - * @remarks - * [Api set: WordApi 1.5] - */ - data = "Data", - /** - * Represents that the field type is Database. - * @remarks - * [Api set: WordApi 1.5] - */ - database = "Database", - /** - * Represents that the field type is Date. - * @remarks - * [Api set: WordApi 1.5] - */ - date = "Date", - /** - * Represents that the field type is DisplayBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - displayBarcode = "DisplayBarcode", - /** - * Represents that the field type is DocumentProperty - * @remarks - * [Api set: WordApi 1.5] - */ - docProperty = "DocProperty", - /** - * Represents that the field type is DocumentVariable. - * @remarks - * [Api set: WordApi 1.5] - */ - docVariable = "DocVariable", - /** - * Represents that the field type is EditTime. - * @remarks - * [Api set: WordApi 1.5] - */ - editTime = "EditTime", - /** - * Represents that the field type is Embedded. - * @remarks - * [Api set: WordApi 1.5] - */ - embedded = "Embedded", - /** - * Represents that the field type is Equation. - * @remarks - * [Api set: WordApi 1.5] - */ - eq = "EQ", - /** - * Represents that the field type is Expression. - * @remarks - * [Api set: WordApi 1.5] - */ - expression = "Expression", - /** - * Represents that the field type is FileName. - * @remarks - * [Api set: WordApi 1.5] - */ - fileName = "FileName", - /** - * Represents that the field type is FileSize. - * @remarks - * [Api set: WordApi 1.5] - */ - fileSize = "FileSize", - /** - * Represents that the field type is FillIn. - * @remarks - * [Api set: WordApi 1.5] - */ - fillIn = "FillIn", - /** - * Represents that the field type is FormCheckbox. - * @remarks - * [Api set: WordApi 1.5] - */ - formCheckbox = "FormCheckbox", - /** - * Represents that the field type is FormDropdown. - * @remarks - * [Api set: WordApi 1.5] - */ - formDropdown = "FormDropdown", - /** - * Represents that the field type is FormText. - * @remarks - * [Api set: WordApi 1.5] - */ - formText = "FormText", - /** - * Represents that the field type is GotoButton. - * @remarks - * [Api set: WordApi 1.5] - */ - gotoButton = "GotoButton", - /** - * Represents that the field type is GreetingLine. - * @remarks - * [Api set: WordApi 1.5] - */ - greetingLine = "GreetingLine", - /** - * Represents that the field type is Hyperlink. - * @remarks - * [Api set: WordApi 1.5] - */ - hyperlink = "Hyperlink", - /** - * Represents that the field type is If. - * @remarks - * [Api set: WordApi 1.5] - */ - if = "If", - /** - * Represents that the field type is Import. - * @remarks - * [Api set: WordApi 1.5] - */ - import = "Import", - /** - * Represents that the field type is Include. - * @remarks - * [Api set: WordApi 1.5] - */ - include = "Include", - /** - * Represents that the field type is IncludePicture. - * @remarks - * [Api set: WordApi 1.5] - */ - includePicture = "IncludePicture", - /** - * Represents that the field type is IncludeText. - * @remarks - * [Api set: WordApi 1.5] - */ - includeText = "IncludeText", - /** - * Represents that the field type is Index. - * @remarks - * [Api set: WordApi 1.5] - */ - index = "Index", - /** - * Represents that the field type is Information. - * @remarks - * [Api set: WordApi 1.5] - */ - info = "Info", - /** - * Represents that the field type is Keywords. - * @remarks - * [Api set: WordApi 1.5] - */ - keywords = "Keywords", - /** - * Represents that the field type is LastSavedBy. - * @remarks - * [Api set: WordApi 1.5] - */ - lastSavedBy = "LastSavedBy", - /** - * Represents that the field type is Link. - * @remarks - * [Api set: WordApi 1.5] - */ - link = "Link", - /** - * Represents that the field type is ListNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - listNum = "ListNum", - /** - * Represents that the field type is MacroButton. - * @remarks - * [Api set: WordApi 1.5] - */ - macroButton = "MacroButton", - /** - * Represents that the field type is MergeBarcode. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeBarcode = "MergeBarcode", - /** - * Represents that the field type is MergeField. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeField = "MergeField", - /** - * Represents that the field type is MergeRecord. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeRec = "MergeRec", - /** - * Represents that the field type is MergeSequence. - * @remarks - * [Api set: WordApi 1.5] - */ - mergeSeq = "MergeSeq", - /** - * Represents that the field type is Next. - * @remarks - * [Api set: WordApi 1.5] - */ - next = "Next", - /** - * Represents that the field type is NextIf. - * @remarks - * [Api set: WordApi 1.5] - */ - nextIf = "NextIf", - /** - * Represents that the field type is NoteReference. - * @remarks - * [Api set: WordApi 1.5] - */ - noteRef = "NoteRef", - /** - * Represents that the field type is NumberOfCharacters. - * @remarks - * [Api set: WordApi 1.5] - */ - numChars = "NumChars", - /** - * Represents that the field type is NumberOfPages. - * @remarks - * [Api set: WordApi 1.5] - */ - numPages = "NumPages", - /** - * Represents that the field type is NumberOfWords. - * @remarks - * [Api set: WordApi 1.5] - */ - numWords = "NumWords", - /** - * Represents that the field type is ActiveXControl. - * @remarks - * [Api set: WordApi 1.5] - */ - ocx = "OCX", - /** - * Represents that the field type is Page. - * @remarks - * [Api set: WordApi 1.5] - */ - page = "Page", - /** - * Represents that the field type is PageReference. - * @remarks - * [Api set: WordApi 1.5] - */ - pageRef = "PageRef", - /** - * Represents that the field type is Print. - * @remarks - * [Api set: WordApi 1.5] - */ - print = "Print", - /** - * Represents that the field type is PrintDate. - * @remarks - * [Api set: WordApi 1.5] - */ - printDate = "PrintDate", - /** - * Represents that the field type is Private. - * @remarks - * [Api set: WordApi 1.5] - */ - private = "Private", - /** - * Represents that the field type is Quote. - * @remarks - * [Api set: WordApi 1.5] - */ - quote = "Quote", - /** - * Represents that the field type is ReferencedDocument. - * @remarks - * [Api set: WordApi 1.5] - */ - rd = "RD", - /** - * Represents that the field type is Reference. - * @remarks - * [Api set: WordApi 1.5] - */ - ref = "Ref", - /** - * Represents that the field type is RevisionNumber. - * @remarks - * [Api set: WordApi 1.5] - */ - revNum = "RevNum", - /** - * Represents that the field type is SaveDate. - * @remarks - * [Api set: WordApi 1.5] - */ - saveDate = "SaveDate", - /** - * Represents that the field type is Section. - * @remarks - * [Api set: WordApi 1.5] - */ - section = "Section", - /** - * Represents that the field type is SectionPages. - * @remarks - * [Api set: WordApi 1.5] - */ - sectionPages = "SectionPages", - /** - * Represents that the field type is Sequence. - * @remarks - * [Api set: WordApi 1.5] - */ - seq = "Seq", - /** - * Represents that the field type is Set. - * @remarks - * [Api set: WordApi 1.5] - */ - set = "Set", - /** - * Represents that the field type is Shape. - * @remarks - * [Api set: WordApi 1.5] - */ - shape = "Shape", - /** - * Represents that the field type is SkipIf. - * @remarks - * [Api set: WordApi 1.5] - */ - skipIf = "SkipIf", - /** - * Represents that the field type is StyleReference. - * @remarks - * [Api set: WordApi 1.5] - */ - styleRef = "StyleRef", - /** - * Represents that the field type is Subject. - * @remarks - * [Api set: WordApi 1.5] - */ - subject = "Subject", - /** - * Represents that the field type is Subscriber. - * @remarks - * [Api set: WordApi 1.5] - */ - subscriber = "Subscriber", - /** - * Represents that the field type is Symbol. - * @remarks - * [Api set: WordApi 1.5] - */ - symbol = "Symbol", - /** - * Represents that the field type is TableOfAuthoritiesEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - ta = "TA", - /** - * Represents that the field type is TableOfContentsEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - tc = "TC", - /** - * Represents that the field type is Template. - * @remarks - * [Api set: WordApi 1.5] - */ - template = "Template", - /** - * Represents that the field type is Time. - * @remarks - * [Api set: WordApi 1.5] - */ - time = "Time", - /** - * Represents that the field type is Title. - * @remarks - * [Api set: WordApi 1.5] - */ - title = "Title", - /** - * Represents that the field type is TableOfAuthorities. - * @remarks - * [Api set: WordApi 1.5] - */ - toa = "TOA", - /** - * Represents that the field type is TableOfContents. - * @remarks - * [Api set: WordApi 1.5] - */ - toc = "TOC", - /** - * Represents that the field type is UserAddress. - * @remarks - * [Api set: WordApi 1.5] - */ - userAddress = "UserAddress", - /** - * Represents that the field type is UserInitials. - * @remarks - * [Api set: WordApi 1.5] - */ - userInitials = "UserInitials", - /** - * Represents that the field type is UserName. - * @remarks - * [Api set: WordApi 1.5] - */ - userName = "UserName", - /** - * Represents that the field type is IndexEntry. - * @remarks - * [Api set: WordApi 1.5] - */ - xe = "XE", - /** - * Represents that the field type is Empty. - * @remarks - * [Api set: WordApi 1.5] - */ - empty = "Empty", - /** - * Represents the field types not supported by the Office JavaScript API. - * @remarks - * [Api set: WordApi 1.5] - */ - others = "Others", - /** - * Represents that the field type is Undefined. - * @remarks - * [Api set: WordApi 1.5] - */ - undefined = "Undefined", - } - /** - * Represents the kind of field. Indicates how the field works in relation to updating. - * - * @remarks - * [Api set: WordApi 1.5] - */ - enum FieldKind { - /** - * Represents that the field is invalid. For example, a pair of field characters with nothing inside. - * @remarks - * [Api set: WordApi 1.5] - */ - none = "None", - /** - * Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - hot = "Hot", - /** - * Represents that the field is automatically updated when the source changes or the field can be manually updated. - * @remarks - * [Api set: WordApi 1.5] - */ - warm = "Warm", - /** - * Represents that the field doesn't have a result. - * @remarks - * [Api set: WordApi 1.5] - */ - cold = "Cold", - } - /** - * Represents the character inserted after the list item mark. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum TrailingCharacter { - /** - * A tab is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingTab = "TrailingTab", - /** - * A space is inserted. Default. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingSpace = "TrailingSpace", - /** - * No character is inserted. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingNone = "TrailingNone", - } - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ListBuiltInNumberStyle { - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic = "Arabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperRoman = "UpperRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerRoman = "LowerRoman", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - upperLetter = "UpperLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowerLetter = "LowerLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinal = "Ordinal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - cardinalText = "CardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ordinalText = "OrdinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanji = "Kanji", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiDigit = "KanjiDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueoHalfWidth = "AiueoHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - irohaHalfWidth = "IrohaHalfWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicFullWidth = "ArabicFullWidth", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional = "KanjiTraditional", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - kanjiTraditional2 = "KanjiTraditional2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberInCircle = "NumberInCircle", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - aiueo = "Aiueo", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - iroha = "Iroha", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ = "ArabicLZ", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - bullet = "Bullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ganada = "Ganada", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - chosung = "Chosung", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum1 = "GBNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum2 = "GBNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum3 = "GBNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - gbnum4 = "GBNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac1 = "Zodiac1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac2 = "Zodiac2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - zodiac3 = "Zodiac3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum1 = "TradChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum2 = "TradChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum3 = "TradChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tradChinNum4 = "TradChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum1 = "SimpChinNum1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum2 = "SimpChinNum2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum3 = "SimpChinNum3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - simpChinNum4 = "SimpChinNum4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaRead = "HanjaRead", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanjaReadDigit = "HanjaReadDigit", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hangul = "Hangul", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hanja = "Hanja", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew1 = "Hebrew1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic1 = "Arabic1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hebrew2 = "Hebrew2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabic2 = "Arabic2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter1 = "HindiLetter1", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiLetter2 = "HindiLetter2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiArabic = "HindiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - hindiCardinalText = "HindiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiLetter = "ThaiLetter", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiArabic = "ThaiArabic", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - thaiCardinalText = "ThaiCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - vietCardinalText = "VietCardinalText", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseRussian = "LowercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseRussian = "UppercaseRussian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseGreek = "LowercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseGreek = "UppercaseGreek", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ2 = "ArabicLZ2", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ3 = "ArabicLZ3", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - arabicLZ4 = "ArabicLZ4", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseTurkish = "LowercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseTurkish = "UppercaseTurkish", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lowercaseBulgarian = "LowercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - uppercaseBulgarian = "UppercaseBulgarian", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - pictureBullet = "PictureBullet", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legal = "Legal", - /** - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - legalLZ = "LegalLZ", - } - /** - * Represents the shading texture. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ShadingTextureType { - /** - * Represents dark diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalDown = "DarkDiagonalDown", - /** - * Represents dark diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkDiagonalUp = "DarkDiagonalUp", - /** - * Represents dark horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkGrid = "DarkGrid", - /** - * Represents dark horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkHorizontal = "DarkHorizontal", - /** - * Represents dark diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkTrellis = "DarkTrellis", - /** - * Represents dark vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - darkVertical = "DarkVertical", - /** - * Represents light diagonal-down texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalDown = "LightDiagonalDown", - /** - * Represents light diagonal-up texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightDiagonalUp = "LightDiagonalUp", - /** - * Represents light horizontal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightGrid = "LightGrid", - /** - * Represents light horizontal texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightHorizontal = "LightHorizontal", - /** - * Represents light diagonal-cross texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightTrellis = "LightTrellis", - /** - * Represents light vertical texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - lightVertical = "LightVertical", - /** - * Represents that there's no texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - none = "None", - /** - * Represents 10 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent10 = "Percent10", - /** - * Represents 12.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent12Pt5 = "Percent12Pt5", - /** - * Represents 15 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent15 = "Percent15", - /** - * Represents 20 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent20 = "Percent20", - /** - * Represents 25 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent25 = "Percent25", - /** - * Represents 30 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent30 = "Percent30", - /** - * Represents 35 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent35 = "Percent35", - /** - * Represents 37.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent37Pt5 = "Percent37Pt5", - /** - * Represents 40 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent40 = "Percent40", - /** - * Represents 45 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent45 = "Percent45", - /** - * Represents 5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent5 = "Percent5", - /** - * Represents 50 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent50 = "Percent50", - /** - * Represents 55 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent55 = "Percent55", - /** - * Represents 60 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent60 = "Percent60", - /** - * Represents 62.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent62Pt5 = "Percent62Pt5", - /** - * Represents 65 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent65 = "Percent65", - /** - * Represents 70 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent70 = "Percent70", - /** - * Represents 75 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent75 = "Percent75", - /** - * Represents 80 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent80 = "Percent80", - /** - * Represents 85 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent85 = "Percent85", - /** - * Represents 87.5 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent87Pt5 = "Percent87Pt5", - /** - * Represents 90 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent90 = "Percent90", - /** - * Represents 95 percent texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - percent95 = "Percent95", - /** - * Represents solid texture. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - solid = "Solid", - } - /** - * Specifies the target document for displaying document comparison differences. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum CompareTarget { - /** - * Places comparison differences in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetCurrent = "CompareTargetCurrent", - /** - * Places comparison differences in the target document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetSelected = "CompareTargetSelected", - /** - * Places comparison differences in a new document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - compareTargetNew = "CompareTargetNew", - } - /** - * Specifies how to handle any conflicts, that is, when imported styles have the same name as existing styles in the current document. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - enum ImportedStylesConflictBehavior { - /** - * Ignore conflicting imported styles and keep the existing version of those styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - ignore = "Ignore", - /** - * Overwrite the existing styles in the current document. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - overwrite = "Overwrite", - /** - * 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. - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - createNew = "CreateNew", - } - /** - * Represents the shape type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeType { - /** - * Unsupported shape type. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - unsupported = "Unsupported", - /** - * Text box shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textBox = "TextBox", - /** - * Geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShape = "GeometricShape", - /** - * Group shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - group = "Group", - /** - * Picture shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Canvas shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas = "Canvas", - } - /** - * Represents what the horizontal position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeHorizontalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to column. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - column = "Column", - /** - * Relative to character. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - character = "Character", - /** - * Relative to left margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin = "LeftMargin", - /** - * Relative to right margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin = "RightMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the vertical position of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeVerticalPosition { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to paragraph. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - paragraph = "Paragraph", - /** - * Relative to line. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - line = "Line", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Represents what the horizontal or vertical size of a shape is relative to. - For more information about margins, see {@link https://support.microsoft.com/office/c95c1ea1-70b1-4dde-a1da-f5aa2042c829 | Change the margins in your Word document}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum RelativeSize { - /** - * Relative to margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - margin = "Margin", - /** - * Relative to page. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - page = "Page", - /** - * Relative to top margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin = "TopMargin", - /** - * Relative to bottom margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin = "BottomMargin", - /** - * Relative to inside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - insideMargin = "InsideMargin", - /** - * Relative to outside margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - outsideMargin = "OutsideMargin", - } - /** - * Specifies the shape type for a `GeometricShape` object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum GeometricShapeType { - /** - * Line inverse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lineInverse = "LineInverse", - /** - * Triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - triangle = "Triangle", - /** - * Right triangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightTriangle = "RightTriangle", - /** - * Rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rectangle = "Rectangle", - /** - * Diamond geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diamond = "Diamond", - /** - * Parallelogram geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parallelogram = "Parallelogram", - /** - * Trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - trapezoid = "Trapezoid", - /** - * Non-isosceles trapezoid geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - nonIsoscelesTrapezoid = "NonIsoscelesTrapezoid", - /** - * Pentagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pentagon = "Pentagon", - /** - * Hexagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hexagon = "Hexagon", - /** - * Heptagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heptagon = "Heptagon", - /** - * Octagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - octagon = "Octagon", - /** - * Decagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - decagon = "Decagon", - /** - * Dodecagon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - dodecagon = "Dodecagon", - /** - * Star 4-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star4 = "Star4", - /** - * Star 5-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star5 = "Star5", - /** - * Star 6-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star6 = "Star6", - /** - * Star 7-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star7 = "Star7", - /** - * Star 8-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star8 = "Star8", - /** - * Star 10-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star10 = "Star10", - /** - * Star 12-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star12 = "Star12", - /** - * Star 16-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star16 = "Star16", - /** - * Star 24-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star24 = "Star24", - /** - * Star 32-point geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - star32 = "Star32", - /** - * Round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - roundRectangle = "RoundRectangle", - /** - * Round one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round1Rectangle = "Round1Rectangle", - /** - * Round two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2SameRectangle = "Round2SameRectangle", - /** - * Round two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - round2DiagonalRectangle = "Round2DiagonalRectangle", - /** - * Snip round rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snipRoundRectangle = "SnipRoundRectangle", - /** - * Snip one rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip1Rectangle = "Snip1Rectangle", - /** - * Snip two same rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2SameRectangle = "Snip2SameRectangle", - /** - * Snip two diagonal rectangle geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - snip2DiagonalRectangle = "Snip2DiagonalRectangle", - /** - * Plaque geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaque = "Plaque", - /** - * Ellipse geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipse = "Ellipse", - /** - * Teardrop geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - teardrop = "Teardrop", - /** - * Home plate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - homePlate = "HomePlate", - /** - * Chevron geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chevron = "Chevron", - /** - * Pie wedge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pieWedge = "PieWedge", - /** - * Pie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pie = "Pie", - /** - * Block arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - blockArc = "BlockArc", - /** - * Donut geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - donut = "Donut", - /** - * No smoking geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noSmoking = "NoSmoking", - /** - * Right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrow = "RightArrow", - /** - * Left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrow = "LeftArrow", - /** - * Up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrow = "UpArrow", - /** - * Down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrow = "DownArrow", - /** - * Striped right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - stripedRightArrow = "StripedRightArrow", - /** - * Notched right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - notchedRightArrow = "NotchedRightArrow", - /** - * Bent up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentUpArrow = "BentUpArrow", - /** - * Left-right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrow = "LeftRightArrow", - /** - * Up-down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrow = "UpDownArrow", - /** - * Left-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftUpArrow = "LeftUpArrow", - /** - * Left-right-up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightUpArrow = "LeftRightUpArrow", - /** - * Quad arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrow = "QuadArrow", - /** - * Left arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftArrowCallout = "LeftArrowCallout", - /** - * Right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightArrowCallout = "RightArrowCallout", - /** - * Up arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upArrowCallout = "UpArrowCallout", - /** - * Down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - downArrowCallout = "DownArrowCallout", - /** - * Left-right arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightArrowCallout = "LeftRightArrowCallout", - /** - * Up-down arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - upDownArrowCallout = "UpDownArrowCallout", - /** - * Quad arrow callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - quadArrowCallout = "QuadArrowCallout", - /** - * Bent arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bentArrow = "BentArrow", - /** - * U-turn arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - uturnArrow = "UturnArrow", - /** - * Circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - circularArrow = "CircularArrow", - /** - * Left circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftCircularArrow = "LeftCircularArrow", - /** - * Left-right circular arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightCircularArrow = "LeftRightCircularArrow", - /** - * Curved right arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedRightArrow = "CurvedRightArrow", - /** - * Curved left arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedLeftArrow = "CurvedLeftArrow", - /** - * Curved up arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedUpArrow = "CurvedUpArrow", - /** - * Curved down arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - curvedDownArrow = "CurvedDownArrow", - /** - * Swoosh arrow geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - swooshArrow = "SwooshArrow", - /** - * Cube geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cube = "Cube", - /** - * Can geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - can = "Can", - /** - * Lightning bolt geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lightningBolt = "LightningBolt", - /** - * Heart geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heart = "Heart", - /** - * Sun geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - sun = "Sun", - /** - * Moon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - moon = "Moon", - /** - * Smiley face geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - smileyFace = "SmileyFace", - /** - * Irregular seal 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal1 = "IrregularSeal1", - /** - * Irregular seal 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - irregularSeal2 = "IrregularSeal2", - /** - * Folded corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foldedCorner = "FoldedCorner", - /** - * Bevel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bevel = "Bevel", - /** - * Frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - frame = "Frame", - /** - * Half frame geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - halfFrame = "HalfFrame", - /** - * Corner geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - corner = "Corner", - /** - * Diagonal stripe geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - diagonalStripe = "DiagonalStripe", - /** - * Chord geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chord = "Chord", - /** - * Arc geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - arc = "Arc", - /** - * Left bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBracket = "LeftBracket", - /** - * Right bracket geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBracket = "RightBracket", - /** - * Left brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftBrace = "LeftBrace", - /** - * Right brace geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightBrace = "RightBrace", - /** - * Bracket pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracketPair = "BracketPair", - /** - * Brace pair geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bracePair = "BracePair", - /** - * Callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout1 = "Callout1", - /** - * Callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout2 = "Callout2", - /** - * Callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - callout3 = "Callout3", - /** - * Accent callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout1 = "AccentCallout1", - /** - * Accent callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout2 = "AccentCallout2", - /** - * Accent callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentCallout3 = "AccentCallout3", - /** - * Border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout1 = "BorderCallout1", - /** - * Border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout2 = "BorderCallout2", - /** - * Border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - borderCallout3 = "BorderCallout3", - /** - * Accent border callout 1 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout1 = "AccentBorderCallout1", - /** - * Accent border callout 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout2 = "AccentBorderCallout2", - /** - * Accent border callout 3 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - accentBorderCallout3 = "AccentBorderCallout3", - /** - * Wedge rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRectCallout = "WedgeRectCallout", - /** - * Wedge rounded rectangle callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeRRectCallout = "WedgeRRectCallout", - /** - * Wedge ellipse callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wedgeEllipseCallout = "WedgeEllipseCallout", - /** - * Cloud callout geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloudCallout = "CloudCallout", - /** - * Cloud geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cloud = "Cloud", - /** - * Ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon = "Ribbon", - /** - * Ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ribbon2 = "Ribbon2", - /** - * Ellipse ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon = "EllipseRibbon", - /** - * Ellipse ribbon 2 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - ellipseRibbon2 = "EllipseRibbon2", - /** - * Left-right ribbon geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRightRibbon = "LeftRightRibbon", - /** - * Vertical scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalScroll = "VerticalScroll", - /** - * Horizontal scroll geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontalScroll = "HorizontalScroll", - /** - * Wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wave = "Wave", - /** - * Double wave geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - doubleWave = "DoubleWave", - /** - * Plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plus = "Plus", - /** - * Flow chart process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartProcess = "FlowChartProcess", - /** - * Flow chart decision geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDecision = "FlowChartDecision", - /** - * Flow chart input-output geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInputOutput = "FlowChartInputOutput", - /** - * Flow chart predefined process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPredefinedProcess = "FlowChartPredefinedProcess", - /** - * Flow chart internal storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartInternalStorage = "FlowChartInternalStorage", - /** - * Flow chart document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDocument = "FlowChartDocument", - /** - * Flow chart multidocument geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMultidocument = "FlowChartMultidocument", - /** - * Flow chart terminator geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartTerminator = "FlowChartTerminator", - /** - * Flow chart preparation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPreparation = "FlowChartPreparation", - /** - * Flow chart manual input geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualInput = "FlowChartManualInput", - /** - * Flow chart manual operation geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartManualOperation = "FlowChartManualOperation", - /** - * Flow chart connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartConnector = "FlowChartConnector", - /** - * Flow chart punched card geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedCard = "FlowChartPunchedCard", - /** - * Flow chart punched tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartPunchedTape = "FlowChartPunchedTape", - /** - * Flow chart summing junction geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSummingJunction = "FlowChartSummingJunction", - /** - * Flow chart OR geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOr = "FlowChartOr", - /** - * Flow chart collate geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartCollate = "FlowChartCollate", - /** - * Flow chart sort geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartSort = "FlowChartSort", - /** - * Flow chart extract geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartExtract = "FlowChartExtract", - /** - * Flow chart merge geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMerge = "FlowChartMerge", - /** - * Flow chart offline storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOfflineStorage = "FlowChartOfflineStorage", - /** - * Flow chart online storage geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOnlineStorage = "FlowChartOnlineStorage", - /** - * Flow chart magnetic tape geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticTape = "FlowChartMagneticTape", - /** - * Flow chart magnetic disk geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDisk = "FlowChartMagneticDisk", - /** - * Flow chart magnetic drum geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartMagneticDrum = "FlowChartMagneticDrum", - /** - * Flow chart display geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDisplay = "FlowChartDisplay", - /** - * Flow chart delay geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartDelay = "FlowChartDelay", - /** - * Flow chart alternate process geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartAlternateProcess = "FlowChartAlternateProcess", - /** - * Flow chart off-page connector geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - flowChartOffpageConnector = "FlowChartOffpageConnector", - /** - * Action button blank geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBlank = "ActionButtonBlank", - /** - * Action button home geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHome = "ActionButtonHome", - /** - * Action button help geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonHelp = "ActionButtonHelp", - /** - * Action button information geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonInformation = "ActionButtonInformation", - /** - * Action button forward next geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonForwardNext = "ActionButtonForwardNext", - /** - * Action button back previous geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBackPrevious = "ActionButtonBackPrevious", - /** - * Action button end geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonEnd = "ActionButtonEnd", - /** - * Action button beginning geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonBeginning = "ActionButtonBeginning", - /** - * Action button return geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonReturn = "ActionButtonReturn", - /** - * Action button document geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonDocument = "ActionButtonDocument", - /** - * Action button sound geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonSound = "ActionButtonSound", - /** - * Action button movie geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - actionButtonMovie = "ActionButtonMovie", - /** - * Gear 6 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear6 = "Gear6", - /** - * Gear 9 geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gear9 = "Gear9", - /** - * Funnel geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - funnel = "Funnel", - /** - * Math plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathPlus = "MathPlus", - /** - * Math minus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMinus = "MathMinus", - /** - * Math multiply geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathMultiply = "MathMultiply", - /** - * Math divide geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathDivide = "MathDivide", - /** - * Math equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathEqual = "MathEqual", - /** - * Math not equal geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mathNotEqual = "MathNotEqual", - /** - * Corner tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - cornerTabs = "CornerTabs", - /** - * Square tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - squareTabs = "SquareTabs", - /** - * Plaque tabs geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - plaqueTabs = "PlaqueTabs", - /** - * Chart X geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartX = "ChartX", - /** - * Chart star geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartStar = "ChartStar", - /** - * Chart plus geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - chartPlus = "ChartPlus", - } - /** - * Specifies a shape's fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeFillType { - /** - * No fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noFill = "NoFill", - /** - * Solid fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - solid = "Solid", - /** - * Gradient fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - gradient = "Gradient", - /** - * Pattern fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pattern = "Pattern", - /** - * Picture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - picture = "Picture", - /** - * Texture fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - texture = "Texture", - /** - * Mixed fill. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies the vertical alignment for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextVerticalAlignment { - /** - * Anchor the text at the top of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top = "Top", - /** - * Anchor the text at the middle of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - middle = "Middle", - /** - * Anchor the text at the bottom of the bounding rectangle. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottom = "Bottom", - } - /** - * Specifies the orientation for the text frame in a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextOrientation { - /** - * No orientation, such as in a new geometric shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Horizontal text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - horizontal = "Horizontal", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianVertical = "EastAsianVertical", - /** - * Determines if all of the text is vertical orientation (each line is 270 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical270 = "Vertical270", - /** - * Determines if all of the text is vertical orientation (each line is 90 degrees rotated clockwise). - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - vertical = "Vertical", - /** - * A special version of vertical text, where some fonts are displayed as if rotated. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - eastAsianHorizontalRotated = "EastAsianHorizontalRotated", - /** - * A combination of automatic orientation is used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Determines the type of automatic sizing allowed. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeAutoSize { - /** - * No autosizing. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * The text is adjusted to fit the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textToFitShape = "TextToFitShape", - /** - * The shape is adjusted to fit the text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeToFitText = "ShapeToFitText", - /** - * A combination of automatic sizing schemes are used. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - mixed = "Mixed", - } - /** - * Specifies how to wrap document text around a shape. For more details, see the "Text Wrapping" tab of {@link https://support.microsoft.com/office/a0f53857-b501-46c6-ba8b-68ba51e0e3cc | Layout options}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapType { - /** - * Places the shape in line with text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - inline = "Inline", - /** - * Wraps text squarely around the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - square = "Square", - /** - * Wraps text close to the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - tight = "Tight", - /** - * Wraps text around and through the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - through = "Through", - /** - * Places text above and below the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topBottom = "TopBottom", - /** - * Places shape behind text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - behind = "Behind", - /** - * Places shape in front of text. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - front = "Front", - } - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farther from the respective page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeTextWrapSide { - /** - * Has no wrap side property, such as those for inline shapes. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - none = "None", - /** - * Both left and right sides of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - both = "Both", - /** - * Left side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left = "Left", - /** - * Right side of the shape only. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - right = "Right", - /** - * Side of the shape that's farther from the respective page margin. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - largest = "Largest", - } - /** - * Specifies the scale size type of a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleType { - /** - * Scale from current size of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - currentSize = "CurrentSize", - /** - * Scale from original size of the shape. It only works for pictures. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - originalSize = "OriginalSize", - } - /** - * Specifies which part of the shape retains its position when the shape is scaled. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - enum ShapeScaleFrom { - /** - * Scale from the top left corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromTopLeft = "ScaleFromTopLeft", - /** - * Scale from the center of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromMiddle = "ScaleFromMiddle", - /** - * Scale from the bottom right corner of the shape. - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - scaleFromBottomRight = "ScaleFromBottomRight", - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - enum ErrorCodes { - accessDenied = "AccessDenied", - generalException = "GeneralException", - invalidArgument = "InvalidArgument", - itemNotFound = "ItemNotFound", - notAllowed = "NotAllowed", - notImplemented = "NotImplemented", - searchDialogIsOpen = "SearchDialogIsOpen", - searchStringInvalidOrTooLong = "SearchStringInvalidOrTooLong", - } - export namespace Interfaces { - /** - * Provides ways to load properties of only a subset of members of a collection. - */ - export interface CollectionLoadOptions { - /** - * Specify the number of items in the queried collection to be included in the result. - */ - $top?: number; - /** - * Specify the number of items in the collection that are to be skipped and not included in the result. If top is specified, the selection of result will start after skipping the specified number of items. - */ - $skip?: number; - } - /** An interface for updating data on the `AnnotationCollection` object, for use in `annotationCollection.set({ ... })`. */ - export interface AnnotationCollectionUpdateData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface for updating data on the `Application` object, for use in `application.set({ ... })`. */ - export interface ApplicationUpdateData { - - - } - /** An interface for updating data on the `Body` object, for use in `body.set({ ... })`. */ - export interface BodyUpdateData { - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `Border` object, for use in `border.set({ ... })`. */ - export interface BorderUpdateData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface for updating data on the `BorderUniversal` object, for use in `borderUniversal.set({ ... })`. */ - export interface BorderUniversalUpdateData { - - - - - - - - } - /** An interface for updating data on the `BorderCollection` object, for use in `borderCollection.set({ ... })`. */ - export interface BorderCollectionUpdateData { - /** - * Specifies the 24-bit color of the inside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderColor?: string; - /** - * Specifies the border type of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the inside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - insideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - /** - * Specifies the 24-bit color of the outside borders. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderColor?: string; - /** - * Specifies the border type of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderType?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width of the outside borders. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outsideBorderWidth?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - items?: Word.Interfaces.BorderData[]; - } - /** An interface for updating data on the `BorderUniversalCollection` object, for use in `borderUniversalCollection.set({ ... })`. */ - export interface BorderUniversalCollectionUpdateData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface for updating data on the `Break` object, for use in `break.set({ ... })`. */ - export interface BreakUpdateData { - - } - /** An interface for updating data on the `BreakCollection` object, for use in `breakCollection.set({ ... })`. */ - export interface BreakCollectionUpdateData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface for updating data on the `BuildingBlock` object, for use in `buildingBlock.set({ ... })`. */ - export interface BuildingBlockUpdateData { - - - - - } - /** An interface for updating data on the `CheckboxContentControl` object, for use in `checkboxContentControl.set({ ... })`. */ - export interface CheckboxContentControlUpdateData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface for updating data on the `Comment` object, for use in `comment.set({ ... })`. */ - export interface CommentUpdateData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface for updating data on the `CommentCollection` object, for use in `commentCollection.set({ ... })`. */ - export interface CommentCollectionUpdateData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface for updating data on the `CommentContentRange` object, for use in `commentContentRange.set({ ... })`. */ - export interface CommentContentRangeUpdateData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface for updating data on the `CommentReply` object, for use in `commentReply.set({ ... })`. */ - export interface CommentReplyUpdateData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeUpdateData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentUpdateData; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - } - /** An interface for updating data on the `CommentReplyCollection` object, for use in `commentReplyCollection.set({ ... })`. */ - export interface CommentReplyCollectionUpdateData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface for updating data on the `XmlMapping` object, for use in `xmlMapping.set({ ... })`. */ - export interface XmlMappingUpdateData { - - - } - /** An interface for updating data on the `CustomXmlPrefixMappingCollection` object, for use in `customXmlPrefixMappingCollection.set({ ... })`. */ - export interface CustomXmlPrefixMappingCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface for updating data on the `CustomXmlSchemaCollection` object, for use in `customXmlSchemaCollection.set({ ... })`. */ - export interface CustomXmlSchemaCollectionUpdateData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface for updating data on the `CustomXmlNodeCollection` object, for use in `customXmlNodeCollection.set({ ... })`. */ - export interface CustomXmlNodeCollectionUpdateData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface for updating data on the `CustomXmlNode` object, for use in `customXmlNode.set({ ... })`. */ - export interface CustomXmlNodeUpdateData { - - - - - - - - - } - /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */ - export interface ContentControlUpdateData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlUpdateData; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - } - /** An interface for updating data on the `ContentControlCollection` object, for use in `contentControlCollection.set({ ... })`. */ - export interface ContentControlCollectionUpdateData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface for updating data on the `ContentControlListItem` object, for use in `contentControlListItem.set({ ... })`. */ - export interface ContentControlListItemUpdateData { - - - - } - /** An interface for updating data on the `ContentControlListItemCollection` object, for use in `contentControlListItemCollection.set({ ... })`. */ - export interface ContentControlListItemCollectionUpdateData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface for updating data on the `CustomProperty` object, for use in `customProperty.set({ ... })`. */ - export interface CustomPropertyUpdateData { - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface for updating data on the `CustomPropertyCollection` object, for use in `customPropertyCollection.set({ ... })`. */ - export interface CustomPropertyCollectionUpdateData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface for updating data on the `CustomXmlPart` object, for use in `customXmlPart.set({ ... })`. */ - export interface CustomXmlPartUpdateData { - - } - /** An interface for updating data on the `CustomXmlPartCollection` object, for use in `customXmlPartCollection.set({ ... })`. */ - export interface CustomXmlPartCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `CustomXmlPartScopedCollection` object, for use in `customXmlPartScopedCollection.set({ ... })`. */ - export interface CustomXmlPartScopedCollectionUpdateData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface for updating data on the `Document` object, for use in `document.set({ ... })`. */ - export interface DocumentUpdateData { - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - } - /** An interface for updating data on the `DocumentCreated` object, for use in `documentCreated.set({ ... })`. */ - export interface DocumentCreatedUpdateData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesUpdateData; - } - /** An interface for updating data on the `DocumentProperties` object, for use in `documentProperties.set({ ... })`. */ - export interface DocumentPropertiesUpdateData { - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface for updating data on the `Field` object, for use in `field.set({ ... })`. */ - export interface FieldUpdateData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeUpdateData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - } - /** An interface for updating data on the `FieldCollection` object, for use in `fieldCollection.set({ ... })`. */ - export interface FieldCollectionUpdateData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface for updating data on the `Font` object, for use in `font.set({ ... })`. */ - export interface FontUpdateData { - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface for updating data on the `Hyperlink` object, for use in `hyperlink.set({ ... })`. */ - export interface HyperlinkUpdateData { - - - - - - - - } - /** An interface for updating data on the `HyperlinkCollection` object, for use in `hyperlinkCollection.set({ ... })`. */ - export interface HyperlinkCollectionUpdateData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface for updating data on the `InlinePicture` object, for use in `inlinePicture.set({ ... })`. */ - export interface InlinePictureUpdateData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface for updating data on the `InlinePictureCollection` object, for use in `inlinePictureCollection.set({ ... })`. */ - export interface InlinePictureCollectionUpdateData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface for updating data on the `ListCollection` object, for use in `listCollection.set({ ... })`. */ - export interface ListCollectionUpdateData { - items?: Word.Interfaces.ListData[]; - } - /** An interface for updating data on the `ListItem` object, for use in `listItem.set({ ... })`. */ - export interface ListItemUpdateData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - } - /** An interface for updating data on the `ListLevel` object, for use in `listLevel.set({ ... })`. */ - export interface ListLevelUpdateData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface for updating data on the `ListLevelCollection` object, for use in `listLevelCollection.set({ ... })`. */ - export interface ListLevelCollectionUpdateData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface for updating data on the `ListTemplate` object, for use in `listTemplate.set({ ... })`. */ - export interface ListTemplateUpdateData { - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface for updating data on the `NoteItem` object, for use in `noteItem.set({ ... })`. */ - export interface NoteItemUpdateData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeUpdateData; - } - /** An interface for updating data on the `NoteItemCollection` object, for use in `noteItemCollection.set({ ... })`. */ - export interface NoteItemCollectionUpdateData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface for updating data on the `PageCollection` object, for use in `pageCollection.set({ ... })`. */ - export interface PageCollectionUpdateData { - items?: Word.Interfaces.PageData[]; - } - /** An interface for updating data on the `PaneCollection` object, for use in `paneCollection.set({ ... })`. */ - export interface PaneCollectionUpdateData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface for updating data on the `WindowCollection` object, for use in `windowCollection.set({ ... })`. */ - export interface WindowCollectionUpdateData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface for updating data on the `Paragraph` object, for use in `paragraph.set({ ... })`. */ - export interface ParagraphUpdateData { - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemUpdateData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemUpdateData; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `ParagraphCollection` object, for use in `paragraphCollection.set({ ... })`. */ - export interface ParagraphCollectionUpdateData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface for updating data on the `ParagraphFormat` object, for use in `paragraphFormat.set({ ... })`. */ - export interface ParagraphFormatUpdateData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface for updating data on the `Range` object, for use in `range.set({ ... })`. */ - export interface RangeUpdateData { - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontUpdateData; - - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - } - /** An interface for updating data on the `RangeCollection` object, for use in `rangeCollection.set({ ... })`. */ - export interface RangeCollectionUpdateData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface for updating data on the `SearchOptions` object, for use in `searchOptions.set({ ... })`. */ - export interface SearchOptionsUpdateData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface for updating data on the `Section` object, for use in `section.set({ ... })`. */ - export interface SectionUpdateData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyUpdateData; - - - } - /** An interface for updating data on the `SectionCollection` object, for use in `sectionCollection.set({ ... })`. */ - export interface SectionCollectionUpdateData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface for updating data on the `Setting` object, for use in `setting.set({ ... })`. */ - export interface SettingUpdateData { - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface for updating data on the `SettingCollection` object, for use in `settingCollection.set({ ... })`. */ - export interface SettingCollectionUpdateData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface for updating data on the `StyleCollection` object, for use in `styleCollection.set({ ... })`. */ - export interface StyleCollectionUpdateData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface for updating data on the `Style` object, for use in `style.set({ ... })`. */ - export interface StyleUpdateData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionUpdateData; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontUpdateData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateUpdateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatUpdateData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingUpdateData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleUpdateData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - - - - - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface for updating data on the `Shading` object, for use in `shading.set({ ... })`. */ - export interface ShadingUpdateData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface for updating data on the `ShadingUniversal` object, for use in `shadingUniversal.set({ ... })`. */ - export interface ShadingUniversalUpdateData { - - - - - - } - /** An interface for updating data on the `Table` object, for use in `table.set({ ... })`. */ - export interface TableUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `TableStyle` object, for use in `tableStyle.set({ ... })`. */ - export interface TableStyleUpdateData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface for updating data on the `TableCollection` object, for use in `tableCollection.set({ ... })`. */ - export interface TableCollectionUpdateData { - items?: Word.Interfaces.TableData[]; - } - /** An interface for updating data on the `TableColumn` object, for use in `tableColumn.set({ ... })`. */ - export interface TableColumnUpdateData { - - - - - } - /** An interface for updating data on the `TableColumnCollection` object, for use in `tableColumnCollection.set({ ... })`. */ - export interface TableColumnCollectionUpdateData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface for updating data on the `TableRow` object, for use in `tableRow.set({ ... })`. */ - export interface TableRowUpdateData { - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontUpdateData; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableRowCollection` object, for use in `tableRowCollection.set({ ... })`. */ - export interface TableRowCollectionUpdateData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface for updating data on the `TableCell` object, for use in `tableCell.set({ ... })`. */ - export interface TableCellUpdateData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface for updating data on the `TableCellCollection` object, for use in `tableCellCollection.set({ ... })`. */ - export interface TableCellCollectionUpdateData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface for updating data on the `TableBorder` object, for use in `tableBorder.set({ ... })`. */ - export interface TableBorderUpdateData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface for updating data on the `Template` object, for use in `template.set({ ... })`. */ - export interface TemplateUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `TemplateCollection` object, for use in `templateCollection.set({ ... })`. */ - export interface TemplateCollectionUpdateData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface for updating data on the `TrackedChangeCollection` object, for use in `trackedChangeCollection.set({ ... })`. */ - export interface TrackedChangeCollectionUpdateData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface for updating data on the `Shape` object, for use in `shape.set({ ... })`. */ - export interface ShapeUpdateData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyUpdateData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasUpdateData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillUpdateData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeUpdateData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupUpdateData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameUpdateData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapUpdateData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface for updating data on the `ShapeGroup` object, for use in `shapeGroup.set({ ... })`. */ - export interface ShapeGroupUpdateData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `Canvas` object, for use in `canvas.set({ ... })`. */ - export interface CanvasUpdateData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeUpdateData; - } - /** An interface for updating data on the `ShapeCollection` object, for use in `shapeCollection.set({ ... })`. */ - export interface ShapeCollectionUpdateData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface for updating data on the `ShapeFill` object, for use in `shapeFill.set({ ... })`. */ - export interface ShapeFillUpdateData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - } - /** An interface for updating data on the `TextFrame` object, for use in `textFrame.set({ ... })`. */ - export interface TextFrameUpdateData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface for updating data on the `ShapeTextWrap` object, for use in `shapeTextWrap.set({ ... })`. */ - export interface ShapeTextWrapUpdateData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface for updating data on the `RepeatingSectionItem` object, for use in `repeatingSectionItem.set({ ... })`. */ - export interface RepeatingSectionItemUpdateData { - - } - /** An interface for updating data on the `DatePickerContentControl` object, for use in `datePickerContentControl.set({ ... })`. */ - export interface DatePickerContentControlUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `PictureContentControl` object, for use in `pictureContentControl.set({ ... })`. */ - export interface PictureContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `GroupContentControl` object, for use in `groupContentControl.set({ ... })`. */ - export interface GroupContentControlUpdateData { - - - - - - - - - - - } - /** An interface for updating data on the `BuildingBlockGalleryContentControl` object, for use in `buildingBlockGalleryContentControl.set({ ... })`. */ - export interface BuildingBlockGalleryContentControlUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `RepeatingSectionContentControl` object, for use in `repeatingSectionContentControl.set({ ... })`. */ - export interface RepeatingSectionContentControlUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `Frame` object, for use in `frame.set({ ... })`. */ - export interface FrameUpdateData { - - - - - - - - - - - - - - - } - /** An interface for updating data on the `FrameCollection` object, for use in `frameCollection.set({ ... })`. */ - export interface FrameCollectionUpdateData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface for updating data on the `DocumentLibraryVersionCollection` object, for use in `documentLibraryVersionCollection.set({ ... })`. */ - export interface DocumentLibraryVersionCollectionUpdateData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface for updating data on the `ListFormat` object, for use in `listFormat.set({ ... })`. */ - export interface ListFormatUpdateData { - - - } - /** An interface for updating data on the `FillFormat` object, for use in `fillFormat.set({ ... })`. */ - export interface FillFormatUpdateData { - - - - - - - - - - - - - } - /** An interface for updating data on the `GlowFormat` object, for use in `glowFormat.set({ ... })`. */ - export interface GlowFormatUpdateData { - - - - } - /** An interface for updating data on the `LineFormat` object, for use in `lineFormat.set({ ... })`. */ - export interface LineFormatUpdateData { - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `ReflectionFormat` object, for use in `reflectionFormat.set({ ... })`. */ - export interface ReflectionFormatUpdateData { - - - - - - } - /** An interface for updating data on the `ColorFormat` object, for use in `colorFormat.set({ ... })`. */ - export interface ColorFormatUpdateData { - - - - - } - /** An interface for updating data on the `ShadowFormat` object, for use in `shadowFormat.set({ ... })`. */ - export interface ShadowFormatUpdateData { - - - - - - - - - - - - } - /** An interface for updating data on the `ThreeDimensionalFormat` object, for use in `threeDimensionalFormat.set({ ... })`. */ - export interface ThreeDimensionalFormatUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `Bibliography` object, for use in `bibliography.set({ ... })`. */ - export interface BibliographyUpdateData { - - } - /** An interface for updating data on the `SourceCollection` object, for use in `sourceCollection.set({ ... })`. */ - export interface SourceCollectionUpdateData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface for updating data on the `PageSetup` object, for use in `pageSetup.set({ ... })`. */ - export interface PageSetupUpdateData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface for updating data on the `LineNumbering` object, for use in `lineNumbering.set({ ... })`. */ - export interface LineNumberingUpdateData { - - - - - - } - /** An interface for updating data on the `TextColumnCollection` object, for use in `textColumnCollection.set({ ... })`. */ - export interface TextColumnCollectionUpdateData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface for updating data on the `TextColumn` object, for use in `textColumn.set({ ... })`. */ - export interface TextColumnUpdateData { - - - } - /** An interface describing the data returned by calling `critiqueAnnotation.toJSON()`. */ - export interface CritiqueAnnotationData { - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: Word.Critique; - } - /** An interface describing the data returned by calling `annotation.toJSON()`. */ - export interface AnnotationData { - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: string; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: Word.AnnotationState | "Created" | "Accepted" | "Rejected"; - } - /** An interface describing the data returned by calling `annotationCollection.toJSON()`. */ - export interface AnnotationCollectionData { - items?: Word.Interfaces.AnnotationData[]; - } - /** An interface describing the data returned by calling `application.toJSON()`. */ - export interface ApplicationData { - - - - } - /** An interface describing the data returned by calling `body.toJSON()`. */ - export interface BodyData { - /** - * Gets the collection of rich text content control objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the collection of field objects in the body. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the body. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the body. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the body. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: Paragraphs in tables aren't returned for requirement sets 1.1 and 1.2. From requirement set 1.3, paragraphs in tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the collection of shape objects in the body, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets the collection of table objects in the body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BodyType | "Unknown" | "MainDoc" | "Section" | "Header" | "Footer" | "TableCell" | "Footnote" | "Endnote" | "NoteItem"; - } - /** An interface describing the data returned by calling `border.toJSON()`. */ - export interface BorderData { - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: string; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: Word.BorderLocation | "Top" | "Left" | "Bottom" | "Right" | "InsideHorizontal" | "InsideVertical" | "Inside" | "Outside" | "All"; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: Word.BorderWidth | "None" | "Pt025" | "Pt050" | "Pt075" | "Pt100" | "Pt150" | "Pt225" | "Pt300" | "Pt450" | "Pt600" | "Mixed"; - } - /** An interface describing the data returned by calling `borderUniversal.toJSON()`. */ - export interface BorderUniversalData { - - - - - - - - - } - /** An interface describing the data returned by calling `borderCollection.toJSON()`. */ - export interface BorderCollectionData { - items?: Word.Interfaces.BorderData[]; - } - /** An interface describing the data returned by calling `borderUniversalCollection.toJSON()`. */ - export interface BorderUniversalCollectionData { - items?: Word.Interfaces.BorderUniversalData[]; - } - /** An interface describing the data returned by calling `break.toJSON()`. */ - export interface BreakData { - - - } - /** An interface describing the data returned by calling `breakCollection.toJSON()`. */ - export interface BreakCollectionData { - items?: Word.Interfaces.BreakData[]; - } - /** An interface describing the data returned by calling `buildingBlock.toJSON()`. */ - export interface BuildingBlockData { - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockCategory.toJSON()`. */ - export interface BuildingBlockCategoryData { - - - } - /** An interface describing the data returned by calling `buildingBlockTypeItem.toJSON()`. */ - export interface BuildingBlockTypeItemData { - - - } - /** An interface describing the data returned by calling `checkboxContentControl.toJSON()`. */ - export interface CheckboxContentControlData { - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** An interface describing the data returned by calling `comment.toJSON()`. */ - export interface CommentData { - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the collection of reply objects associated with the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - replies?: Word.Interfaces.CommentReplyData[]; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** An interface describing the data returned by calling `commentCollection.toJSON()`. */ - export interface CommentCollectionData { - items?: Word.Interfaces.CommentData[]; - } - /** An interface describing the data returned by calling `commentContentRange.toJSON()`. */ - export interface CommentContentRangeData { - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: string; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - } - /** An interface describing the data returned by calling `commentReply.toJSON()`. */ - export interface CommentReplyData { - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeData; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentData; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: string; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: string; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: string; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: Date; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - } - /** An interface describing the data returned by calling `commentReplyCollection.toJSON()`. */ - export interface CommentReplyCollectionData { - items?: Word.Interfaces.CommentReplyData[]; - } - /** An interface describing the data returned by calling `xmlMapping.toJSON()`. */ - export interface XmlMappingData { - - - - - - } - /** An interface describing the data returned by calling `customXmlPrefixMappingCollection.toJSON()`. */ - export interface CustomXmlPrefixMappingCollectionData { - items?: Word.Interfaces.CustomXmlPrefixMappingData[]; - } - /** An interface describing the data returned by calling `customXmlPrefixMapping.toJSON()`. */ - export interface CustomXmlPrefixMappingData { - - - } - /** An interface describing the data returned by calling `customXmlSchema.toJSON()`. */ - export interface CustomXmlSchemaData { - - - } - /** An interface describing the data returned by calling `customXmlSchemaCollection.toJSON()`. */ - export interface CustomXmlSchemaCollectionData { - items?: Word.Interfaces.CustomXmlSchemaData[]; - } - /** An interface describing the data returned by calling `customXmlNodeCollection.toJSON()`. */ - export interface CustomXmlNodeCollectionData { - items?: Word.Interfaces.CustomXmlNodeData[]; - } - /** An interface describing the data returned by calling `customXmlNode.toJSON()`. */ - export interface CustomXmlNodeData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `contentControl.toJSON()`. */ - export interface ContentControlData { - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlData; - - /** - * Gets the collection of content control objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - - - /** - * Gets the collection of field objects in the content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - /** - * Gets the collection of InlinePicture objects in the content control. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the collection of list objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lists?: Word.Interfaces.ListData[]; - /** - * Gets the collection of paragraph objects in the content control. - * - * @remarks - * [Api set: WordApi 1.1] - * - * Important: For requirement sets 1.1 and 1.2, paragraphs in tables wholly contained within this content control aren't returned. From requirement set 1.3, paragraphs in such tables are also returned. - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - - - /** - * Gets the collection of table objects in the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: Word.ContentControlAppearance | "BoundingBox" | "Tags" | "Hidden"; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: number; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: string; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: string; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: string; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: Word.ContentControlType | "Unknown" | "RichTextInline" | "RichTextParagraphs" | "RichTextTableCell" | "RichTextTableRow" | "RichTextTable" | "PlainTextInline" | "PlainTextParagraph" | "Picture" | "BuildingBlockGallery" | "CheckBox" | "ComboBox" | "DropDownList" | "DatePicker" | "RepeatingSection" | "RichText" | "PlainText" | "Group"; - } - /** An interface describing the data returned by calling `contentControlCollection.toJSON()`. */ - export interface ContentControlCollectionData { - items?: Word.Interfaces.ContentControlData[]; - } - /** An interface describing the data returned by calling `contentControlListItem.toJSON()`. */ - export interface ContentControlListItemData { - - - - } - /** An interface describing the data returned by calling `contentControlListItemCollection.toJSON()`. */ - export interface ContentControlListItemCollectionData { - items?: Word.Interfaces.ContentControlListItemData[]; - } - /** An interface describing the data returned by calling `customProperty.toJSON()`. */ - export interface CustomPropertyData { - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: string; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.DocumentPropertyType | "String" | "Number" | "Date" | "Boolean"; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: any; - } - /** An interface describing the data returned by calling `customPropertyCollection.toJSON()`. */ - export interface CustomPropertyCollectionData { - items?: Word.Interfaces.CustomPropertyData[]; - } - /** An interface describing the data returned by calling `customXmlPart.toJSON()`. */ - export interface CustomXmlPartData { - - - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: string; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: string; - - } - /** An interface describing the data returned by calling `customXmlPartCollection.toJSON()`. */ - export interface CustomXmlPartCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `customXmlPartScopedCollection.toJSON()`. */ - export interface CustomXmlPartScopedCollectionData { - items?: Word.Interfaces.CustomXmlPartData[]; - } - /** An interface describing the data returned by calling `document.toJSON()`. */ - export interface DocumentData { - /** - * Gets the active window for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - activeWindow?: Word.Interfaces.WindowData; - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - /** - * Gets the custom XML parts in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - customXmlParts?: Word.Interfaces.CustomXmlPartData[]; - - - - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - sections?: Word.Interfaces.SectionData[]; - /** - * Gets the add-in's settings in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - settings?: Word.Interfaces.SettingData[]; - /** - * Gets the collection of `Word.Window` objects for the document. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - windows?: Word.Interfaces.WindowData[]; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: Word.ChangeTrackingMode | "Off" | "TrackAll" | "TrackMineOnly"; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentCreated.toJSON()`. */ - export interface DocumentCreatedData { - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the collection of content control objects in the document. This includes content controls in the body of the document, headers, footers, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - contentControls?: Word.Interfaces.ContentControlData[]; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesData; - /** - * Gets the collection of section objects in the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - sections?: Word.Interfaces.SectionData[]; - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** An interface describing the data returned by calling `documentProperties.toJSON()`. */ - export interface DocumentPropertiesData { - /** - * Gets the collection of custom properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - customProperties?: Word.Interfaces.CustomPropertyData[]; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: string; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: string; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: string; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: string; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: string; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: Date; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: string; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: string; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: string; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: Date; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: Date; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: string; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: string; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: number; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: string; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: string; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: string; - } - /** An interface describing the data returned by calling `dropDownListContentControl.toJSON()`. */ - export interface DropDownListContentControlData { - } - /** An interface describing the data returned by calling `comboBoxContentControl.toJSON()`. */ - export interface ComboBoxContentControlData { - } - /** An interface describing the data returned by calling `field.toJSON()`. */ - export interface FieldData { - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeData; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: string; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: string; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"; - } - /** An interface describing the data returned by calling `fieldCollection.toJSON()`. */ - export interface FieldCollectionData { - items?: Word.Interfaces.FieldData[]; - } - /** An interface describing the data returned by calling `font.toJSON()`. */ - export interface FontData { - - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: string; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: string; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: string; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: number; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: Word.UnderlineType | "Mixed" | "None" | "Hidden" | "DotLine" | "Single" | "Word" | "Double" | "Thick" | "Dotted" | "DottedHeavy" | "DashLine" | "DashLineHeavy" | "DashLineLong" | "DashLineLongHeavy" | "DotDashLine" | "DotDashLineHeavy" | "TwoDotDashLine" | "TwoDotDashLineHeavy" | "Wave" | "WaveHeavy" | "WaveDouble"; - - } - /** An interface describing the data returned by calling `hyperlink.toJSON()`. */ - export interface HyperlinkData { - - - - - - - - - - - } - /** An interface describing the data returned by calling `hyperlinkCollection.toJSON()`. */ - export interface HyperlinkCollectionData { - items?: Word.Interfaces.HyperlinkData[]; - } - /** An interface describing the data returned by calling `inlinePicture.toJSON()`. */ - export interface InlinePictureData { - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: string; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: string; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: number; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: string; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: Word.ImageFormat | "Unsupported" | "Undefined" | "Bmp" | "Jpeg" | "Gif" | "Tiff" | "Png" | "Icon" | "Exif" | "Wmf" | "Emf" | "Pict" | "Pdf" | "Svg"; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: number; - } - /** An interface describing the data returned by calling `inlinePictureCollection.toJSON()`. */ - export interface InlinePictureCollectionData { - items?: Word.Interfaces.InlinePictureData[]; - } - /** An interface describing the data returned by calling `list.toJSON()`. */ - export interface ListData { - /** - * Gets paragraphs in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - paragraphs?: Word.Interfaces.ParagraphData[]; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: number; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean[]; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: Word.ListLevelType[]; - } - /** An interface describing the data returned by calling `listCollection.toJSON()`. */ - export interface ListCollectionData { - items?: Word.Interfaces.ListData[]; - } - /** An interface describing the data returned by calling `listItem.toJSON()`. */ - export interface ListItemData { - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: number; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: string; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: number; - } - /** An interface describing the data returned by calling `listLevel.toJSON()`. */ - export interface ListLevelData { - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: string; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: string; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: number; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: Word.ListBuiltInNumberStyle | "None" | "Arabic" | "UpperRoman" | "LowerRoman" | "UpperLetter" | "LowerLetter" | "Ordinal" | "CardinalText" | "OrdinalText" | "Kanji" | "KanjiDigit" | "AiueoHalfWidth" | "IrohaHalfWidth" | "ArabicFullWidth" | "KanjiTraditional" | "KanjiTraditional2" | "NumberInCircle" | "Aiueo" | "Iroha" | "ArabicLZ" | "Bullet" | "Ganada" | "Chosung" | "GBNum1" | "GBNum2" | "GBNum3" | "GBNum4" | "Zodiac1" | "Zodiac2" | "Zodiac3" | "TradChinNum1" | "TradChinNum2" | "TradChinNum3" | "TradChinNum4" | "SimpChinNum1" | "SimpChinNum2" | "SimpChinNum3" | "SimpChinNum4" | "HanjaRead" | "HanjaReadDigit" | "Hangul" | "Hanja" | "Hebrew1" | "Arabic1" | "Hebrew2" | "Arabic2" | "HindiLetter1" | "HindiLetter2" | "HindiArabic" | "HindiCardinalText" | "ThaiLetter" | "ThaiArabic" | "ThaiCardinalText" | "VietCardinalText" | "LowercaseRussian" | "UppercaseRussian" | "LowercaseGreek" | "UppercaseGreek" | "ArabicLZ2" | "ArabicLZ3" | "ArabicLZ4" | "LowercaseTurkish" | "UppercaseTurkish" | "LowercaseBulgarian" | "UppercaseBulgarian" | "PictureBullet" | "Legal" | "LegalLZ"; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: number; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: number; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: number; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: number; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: Word.TrailingCharacter | "TrailingTab" | "TrailingSpace" | "TrailingNone"; - } - /** An interface describing the data returned by calling `listLevelCollection.toJSON()`. */ - export interface ListLevelCollectionData { - items?: Word.Interfaces.ListLevelData[]; - } - /** An interface describing the data returned by calling `listTemplate.toJSON()`. */ - export interface ListTemplateData { - /** - * Gets a `ListLevelCollection` object that represents all the levels for the list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listLevels?: Word.Interfaces.ListLevelData[]; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** An interface describing the data returned by calling `noteItem.toJSON()`. */ - export interface NoteItemData { - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyData; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeData; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.NoteItemType | "Footnote" | "Endnote"; - } - /** An interface describing the data returned by calling `noteItemCollection.toJSON()`. */ - export interface NoteItemCollectionData { - items?: Word.Interfaces.NoteItemData[]; - } - /** An interface describing the data returned by calling `page.toJSON()`. */ - export interface PageData { - - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: number; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - } - /** An interface describing the data returned by calling `pageCollection.toJSON()`. */ - export interface PageCollectionData { - items?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `pane.toJSON()`. */ - export interface PaneData { - /** - * Gets the collection of pages in the pane. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - /** - * Gets the `PageCollection` shown in the viewport of the pane. If a page is partially visible in the pane, the whole page is returned. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pagesEnclosingViewport?: Word.Interfaces.PageData[]; - } - /** An interface describing the data returned by calling `paneCollection.toJSON()`. */ - export interface PaneCollectionData { - items?: Word.Interfaces.PaneData[]; - } - /** An interface describing the data returned by calling `window.toJSON()`. */ - export interface WindowData { - } - /** An interface describing the data returned by calling `windowCollection.toJSON()`. */ - export interface WindowCollectionData { - items?: Word.Interfaces.WindowData[]; - } - /** An interface describing the data returned by calling `paragraph.toJSON()`. */ - export interface ParagraphData { - - /** - * Gets the collection of fields in the paragraph. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the collection of InlinePicture objects in the paragraph. The collection doesn't include floating images. - * - * @remarks - * [Api set: WordApi 1.1] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemData; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemData; - - /** - * Gets the collection of shape objects anchored in the paragraph, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: number; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: number; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: number; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: number; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: number; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: number; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: number; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: number; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: string; - } - /** An interface describing the data returned by calling `paragraphCollection.toJSON()`. */ - export interface ParagraphCollectionData { - items?: Word.Interfaces.ParagraphData[]; - } - /** An interface describing the data returned by calling `paragraphFormat.toJSON()`. */ - export interface ParagraphFormatData { - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: number; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: number; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: number; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: number; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: number; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: Word.OutlineLevel | "OutlineLevel1" | "OutlineLevel2" | "OutlineLevel3" | "OutlineLevel4" | "OutlineLevel5" | "OutlineLevel6" | "OutlineLevel7" | "OutlineLevel8" | "OutlineLevel9" | "OutlineLevelBodyText"; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: number; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: number; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: number; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** An interface describing the data returned by calling `range.toJSON()`. */ - export interface RangeData { - /** - * Gets the collection of field objects in the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets the collection of inline picture objects in the range. - * - * @remarks - * [Api set: WordApi 1.2] - */ - inlinePictures?: Word.Interfaces.InlinePictureData[]; - - /** - * Gets the collection of pages in the range. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - pages?: Word.Interfaces.PageData[]; - - - /** - * Gets the collection of shape objects anchored in the range, including both inline and floating shapes. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: string; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: string; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: string; - } - /** An interface describing the data returned by calling `rangeCollection.toJSON()`. */ - export interface RangeCollectionData { - items?: Word.Interfaces.RangeData[]; - } - /** An interface describing the data returned by calling `searchOptions.toJSON()`. */ - export interface SearchOptionsData { - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** An interface describing the data returned by calling `section.toJSON()`. */ - export interface SectionData { - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyData; - - - - } - /** An interface describing the data returned by calling `sectionCollection.toJSON()`. */ - export interface SectionCollectionData { - items?: Word.Interfaces.SectionData[]; - } - /** An interface describing the data returned by calling `setting.toJSON()`. */ - export interface SettingData { - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: string; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: any; - } - /** An interface describing the data returned by calling `settingCollection.toJSON()`. */ - export interface SettingCollectionData { - items?: Word.Interfaces.SettingData[]; - } - /** An interface describing the data returned by calling `styleCollection.toJSON()`. */ - export interface StyleCollectionData { - items?: Word.Interfaces.StyleData[]; - } - /** An interface describing the data returned by calling `style.toJSON()`. */ - export interface StyleData { - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderData[]; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontData; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateData; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatData; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingData; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleData; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: string; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: string; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: string; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: number; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: Word.StyleType | "Character" | "List" | "Paragraph" | "Table"; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** An interface describing the data returned by calling `shading.toJSON()`. */ - export interface ShadingData { - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: string; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: string; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: Word.ShadingTextureType | "DarkDiagonalDown" | "DarkDiagonalUp" | "DarkGrid" | "DarkHorizontal" | "DarkTrellis" | "DarkVertical" | "LightDiagonalDown" | "LightDiagonalUp" | "LightGrid" | "LightHorizontal" | "LightTrellis" | "LightVertical" | "None" | "Percent10" | "Percent12Pt5" | "Percent15" | "Percent20" | "Percent25" | "Percent30" | "Percent35" | "Percent37Pt5" | "Percent40" | "Percent45" | "Percent5" | "Percent50" | "Percent55" | "Percent60" | "Percent62Pt5" | "Percent65" | "Percent70" | "Percent75" | "Percent80" | "Percent85" | "Percent87Pt5" | "Percent90" | "Percent95" | "Solid"; - } - /** An interface describing the data returned by calling `shadingUniversal.toJSON()`. */ - export interface ShadingUniversalData { - - - - - - } - /** An interface describing the data returned by calling `table.toJSON()`. */ - export interface TableData { - /** - * Gets the collection of field objects in the table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets all of the table rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rows?: Word.Interfaces.TableRowData[]; - /** - * Gets the child tables nested one level deeper. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tables?: Word.Interfaces.TableData[]; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: number; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: number; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: string; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: Word.BuiltInStyleName | "Other" | "Normal" | "Heading1" | "Heading2" | "Heading3" | "Heading4" | "Heading5" | "Heading6" | "Heading7" | "Heading8" | "Heading9" | "Toc1" | "Toc2" | "Toc3" | "Toc4" | "Toc5" | "Toc6" | "Toc7" | "Toc8" | "Toc9" | "FootnoteText" | "Header" | "Footer" | "Caption" | "FootnoteReference" | "EndnoteReference" | "EndnoteText" | "Title" | "Subtitle" | "Hyperlink" | "Strong" | "Emphasis" | "NoSpacing" | "ListParagraph" | "Quote" | "IntenseQuote" | "SubtleEmphasis" | "IntenseEmphasis" | "SubtleReference" | "IntenseReference" | "BookTitle" | "Bibliography" | "TocHeading" | "TableGrid" | "PlainTable1" | "PlainTable2" | "PlainTable3" | "PlainTable4" | "PlainTable5" | "TableGridLight" | "GridTable1Light" | "GridTable1Light_Accent1" | "GridTable1Light_Accent2" | "GridTable1Light_Accent3" | "GridTable1Light_Accent4" | "GridTable1Light_Accent5" | "GridTable1Light_Accent6" | "GridTable2" | "GridTable2_Accent1" | "GridTable2_Accent2" | "GridTable2_Accent3" | "GridTable2_Accent4" | "GridTable2_Accent5" | "GridTable2_Accent6" | "GridTable3" | "GridTable3_Accent1" | "GridTable3_Accent2" | "GridTable3_Accent3" | "GridTable3_Accent4" | "GridTable3_Accent5" | "GridTable3_Accent6" | "GridTable4" | "GridTable4_Accent1" | "GridTable4_Accent2" | "GridTable4_Accent3" | "GridTable4_Accent4" | "GridTable4_Accent5" | "GridTable4_Accent6" | "GridTable5Dark" | "GridTable5Dark_Accent1" | "GridTable5Dark_Accent2" | "GridTable5Dark_Accent3" | "GridTable5Dark_Accent4" | "GridTable5Dark_Accent5" | "GridTable5Dark_Accent6" | "GridTable6Colorful" | "GridTable6Colorful_Accent1" | "GridTable6Colorful_Accent2" | "GridTable6Colorful_Accent3" | "GridTable6Colorful_Accent4" | "GridTable6Colorful_Accent5" | "GridTable6Colorful_Accent6" | "GridTable7Colorful" | "GridTable7Colorful_Accent1" | "GridTable7Colorful_Accent2" | "GridTable7Colorful_Accent3" | "GridTable7Colorful_Accent4" | "GridTable7Colorful_Accent5" | "GridTable7Colorful_Accent6" | "ListTable1Light" | "ListTable1Light_Accent1" | "ListTable1Light_Accent2" | "ListTable1Light_Accent3" | "ListTable1Light_Accent4" | "ListTable1Light_Accent5" | "ListTable1Light_Accent6" | "ListTable2" | "ListTable2_Accent1" | "ListTable2_Accent2" | "ListTable2_Accent3" | "ListTable2_Accent4" | "ListTable2_Accent5" | "ListTable2_Accent6" | "ListTable3" | "ListTable3_Accent1" | "ListTable3_Accent2" | "ListTable3_Accent3" | "ListTable3_Accent4" | "ListTable3_Accent5" | "ListTable3_Accent6" | "ListTable4" | "ListTable4_Accent1" | "ListTable4_Accent2" | "ListTable4_Accent3" | "ListTable4_Accent4" | "ListTable4_Accent5" | "ListTable4_Accent6" | "ListTable5Dark" | "ListTable5Dark_Accent1" | "ListTable5Dark_Accent2" | "ListTable5Dark_Accent3" | "ListTable5Dark_Accent4" | "ListTable5Dark_Accent5" | "ListTable5Dark_Accent6" | "ListTable6Colorful" | "ListTable6Colorful_Accent1" | "ListTable6Colorful_Accent2" | "ListTable6Colorful_Accent3" | "ListTable6Colorful_Accent4" | "ListTable6Colorful_Accent5" | "ListTable6Colorful_Accent6" | "ListTable7Colorful" | "ListTable7Colorful_Accent1" | "ListTable7Colorful_Accent2" | "ListTable7Colorful_Accent3" | "ListTable7Colorful_Accent4" | "ListTable7Colorful_Accent5" | "ListTable7Colorful_Accent6"; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableStyle.toJSON()`. */ - export interface TableStyleData { - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: number; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: number; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: number; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: number; - } - /** An interface describing the data returned by calling `tableCollection.toJSON()`. */ - export interface TableCollectionData { - items?: Word.Interfaces.TableData[]; - } - /** An interface describing the data returned by calling `tableColumn.toJSON()`. */ - export interface TableColumnData { - - - - - - - - - - } - /** An interface describing the data returned by calling `tableColumnCollection.toJSON()`. */ - export interface TableColumnCollectionData { - items?: Word.Interfaces.TableColumnData[]; - } - /** An interface describing the data returned by calling `tableRow.toJSON()`. */ - export interface TableRowData { - /** - * Gets cells. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cells?: Word.Interfaces.TableCellData[]; - /** - * Gets the collection of field objects in the table row. - * - * @remarks - * [Api set: WordApi 1.4] - */ - fields?: Word.Interfaces.FieldData[]; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontData; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: number; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: number; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: string[][]; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - } - /** An interface describing the data returned by calling `tableRowCollection.toJSON()`. */ - export interface TableRowCollectionData { - items?: Word.Interfaces.TableRowData[]; - } - /** An interface describing the data returned by calling `tableCell.toJSON()`. */ - export interface TableCellData { - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: number; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: number; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: Word.Alignment | "Mixed" | "Unknown" | "Left" | "Centered" | "Right" | "Justified"; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: number; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: string; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: string; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: Word.VerticalAlignment | "Mixed" | "Top" | "Center" | "Bottom"; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `tableCellCollection.toJSON()`. */ - export interface TableCellCollectionData { - items?: Word.Interfaces.TableCellData[]; - } - /** An interface describing the data returned by calling `tableBorder.toJSON()`. */ - export interface TableBorderData { - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: string; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: Word.BorderType | "Mixed" | "None" | "Single" | "Double" | "Dotted" | "Dashed" | "DotDashed" | "Dot2Dashed" | "Triple" | "ThinThickSmall" | "ThickThinSmall" | "ThinThickThinSmall" | "ThinThickMed" | "ThickThinMed" | "ThinThickThinMed" | "ThinThickLarge" | "ThickThinLarge" | "ThinThickThinLarge" | "Wave" | "DoubleWave" | "DashedSmall" | "DashDotStroked" | "ThreeDEmboss" | "ThreeDEngrave"; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: number; - } - /** An interface describing the data returned by calling `template.toJSON()`. */ - export interface TemplateData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `templateCollection.toJSON()`. */ - export interface TemplateCollectionData { - items?: Word.Interfaces.TemplateData[]; - } - /** An interface describing the data returned by calling `trackedChange.toJSON()`. */ - export interface TrackedChangeData { - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: string; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: Date; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: string; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: Word.TrackedChangeType | "None" | "Added" | "Deleted" | "Formatted"; - } - /** An interface describing the data returned by calling `trackedChangeCollection.toJSON()`. */ - export interface TrackedChangeCollectionData { - items?: Word.Interfaces.TrackedChangeData[]; - } - /** An interface describing the data returned by calling `shape.toJSON()`. */ - export interface ShapeData { - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyData; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasData; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillData; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeData; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeData; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupData; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameData; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapData; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: string; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: number; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: number; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: number; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: number; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: string; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: Word.RelativeSize | "Margin" | "Page" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: number; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: number; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: number; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeType | "Unsupported" | "TextBox" | "GeometricShape" | "Group" | "Picture" | "Canvas"; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: number; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: number; - } - /** An interface describing the data returned by calling `shapeGroup.toJSON()`. */ - export interface ShapeGroupData { - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, geometric shapes, and pictures are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `canvas.toJSON()`. */ - export interface CanvasData { - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeData; - /** - * Gets the collection of Shape objects. Currently, only text boxes, pictures, and geometric shapes are supported. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapes?: Word.Interfaces.ShapeData[]; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: number; - } - /** An interface describing the data returned by calling `shapeCollection.toJSON()`. */ - export interface ShapeCollectionData { - items?: Word.Interfaces.ShapeData[]; - } - /** An interface describing the data returned by calling `shapeFill.toJSON()`. */ - export interface ShapeFillData { - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: string; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: string; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: number; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeFillType | "NoFill" | "Solid" | "Gradient" | "Pattern" | "Picture" | "Texture" | "Mixed"; - } - /** An interface describing the data returned by calling `textFrame.toJSON()`. */ - export interface TextFrameData { - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: number; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: number; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: number; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: number; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** An interface describing the data returned by calling `shapeTextWrap.toJSON()`. */ - export interface ShapeTextWrapData { - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: number; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: number; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: number; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: Word.ShapeTextWrapSide | "None" | "Both" | "Left" | "Right" | "Largest"; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: number; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: Word.ShapeTextWrapType | "Inline" | "Square" | "Tight" | "Through" | "TopBottom" | "Behind" | "Front"; - } - /** An interface describing the data returned by calling `repeatingSectionItem.toJSON()`. */ - export interface RepeatingSectionItemData { - - } - /** An interface describing the data returned by calling `datePickerContentControl.toJSON()`. */ - export interface DatePickerContentControlData { - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `pictureContentControl.toJSON()`. */ - export interface PictureContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `groupContentControl.toJSON()`. */ - export interface GroupContentControlData { - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `buildingBlockGalleryContentControl.toJSON()`. */ - export interface BuildingBlockGalleryContentControlData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `repeatingSectionContentControl.toJSON()`. */ - export interface RepeatingSectionContentControlData { - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frame.toJSON()`. */ - export interface FrameData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `frameCollection.toJSON()`. */ - export interface FrameCollectionData { - items?: Word.Interfaces.FrameData[]; - } - /** An interface describing the data returned by calling `documentLibraryVersion.toJSON()`. */ - export interface DocumentLibraryVersionData { - - - - } - /** An interface describing the data returned by calling `documentLibraryVersionCollection.toJSON()`. */ - export interface DocumentLibraryVersionCollectionData { - items?: Word.Interfaces.DocumentLibraryVersionData[]; - } - /** An interface describing the data returned by calling `listFormat.toJSON()`. */ - export interface ListFormatData { - - - - - - - - - } - /** An interface describing the data returned by calling `fillFormat.toJSON()`. */ - export interface FillFormatData { - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `glowFormat.toJSON()`. */ - export interface GlowFormatData { - - - - } - /** An interface describing the data returned by calling `lineFormat.toJSON()`. */ - export interface LineFormatData { - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `reflectionFormat.toJSON()`. */ - export interface ReflectionFormatData { - - - - - - } - /** An interface describing the data returned by calling `colorFormat.toJSON()`. */ - export interface ColorFormatData { - - - - - - } - /** An interface describing the data returned by calling `shadowFormat.toJSON()`. */ - export interface ShadowFormatData { - - - - - - - - - - - - } - /** An interface describing the data returned by calling `threeDimensionalFormat.toJSON()`. */ - export interface ThreeDimensionalFormatData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `bibliography.toJSON()`. */ - export interface BibliographyData { - - - } - /** An interface describing the data returned by calling `sourceCollection.toJSON()`. */ - export interface SourceCollectionData { - items?: Word.Interfaces.SourceData[]; - } - /** An interface describing the data returned by calling `source.toJSON()`. */ - export interface SourceData { - - - - } - /** An interface describing the data returned by calling `pageSetup.toJSON()`. */ - export interface PageSetupData { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } - /** An interface describing the data returned by calling `lineNumbering.toJSON()`. */ - export interface LineNumberingData { - - - - - - } - /** An interface describing the data returned by calling `textColumnCollection.toJSON()`. */ - export interface TextColumnCollectionData { - items?: Word.Interfaces.TextColumnData[]; - } - /** An interface describing the data returned by calling `textColumn.toJSON()`. */ - export interface TextColumnData { - - - } - /** - * Represents an annotation wrapper around critique displayed in the document. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CritiqueAnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the range of text that is annotated. - * - * @remarks - * [Api set: WordApi 1.7] - */ - range?: Word.Interfaces.RangeLoadOptions; - /** - * Gets the critique that was passed when the annotation was inserted. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critique?: boolean; - } - /** - * Represents an annotation attached to a paragraph. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Contains a collection of {@link Word.Annotation} objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface AnnotationCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the critique annotation object. - * - * @remarks - * [Api set: WordApi 1.7] - */ - critiqueAnnotation?: Word.Interfaces.CritiqueAnnotationLoadOptions; - /** - * For EACH ITEM in the collection: Gets the unique identifier, which is meant to be used for easier tracking of Annotation objects. - * - * @remarks - * [Api set: WordApi 1.7] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the state of the annotation. - * - * @remarks - * [Api set: WordApi 1.7] - */ - state?: boolean; - } - /** - * Represents the application object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ApplicationLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - } - /** - * Represents the body of a document or a section. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface BodyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the body. Use this to get and set font name, size, color and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. Throws an `ItemNotFound` error if there isn't a parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent body of the body. For example, a table cell body's parent body could be a header. If there isn't a parent body, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBodyOrNullObject?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the body. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the body. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the parent section of the body. Throws an `ItemNotFound` error if there isn't a parent section. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSection?: Word.Interfaces.SectionLoadOptions; - /** - * Gets the parent section of the body. If there isn't a parent section, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentSectionOrNullObject?: Word.Interfaces.SectionLoadOptions; - /** - * Specifies the style name for the body. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the body. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the body. Use the insertText method to insert text. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets the type of the body. The type can be 'MainDoc', 'Section', 'Header', 'Footer', or 'TableCell'. Additional types ‘Footnote’, ‘Endnote’, and ‘NoteItem’ are supported in WordApiOnline 1.1 and later. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - } - /** - * Represents the Border object for text, a paragraph, or a table. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - /** - * Represents the collection of border styles. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface BorderCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color for the border. Color is specified in ‘#RRGGBB’ format or by using the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets the location of the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - location?: boolean; - /** - * For EACH ITEM in the collection: Specifies the border type for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the border is visible. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width for the border. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - width?: boolean; - } - - - - - - - /** - * The data specific to content controls of type CheckBox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - export interface CheckboxContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the current state of the checkbox. - * - * @remarks - * [Api set: WordApi 1.7] - */ - isChecked?: boolean; - } - /** - * Represents a comment in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * Contains a collection of {@link Word.Comment} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment's content as plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment thread's status. Setting to true resolves the comment thread. Getting a value of true means that the comment thread is resolved. - * - * @remarks - * [Api set: WordApi 1.4] - */ - resolved?: boolean; - } - /** - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentContentRangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether the comment text is bold. - * - * @remarks - * [Api set: WordApi 1.4] - */ - bold?: boolean; - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.4] - */ - isEmpty?: boolean; - /** - * Specifies a value that indicates whether the comment text is italicized. - * - * @remarks - * [Api set: WordApi 1.4] - */ - italic?: boolean; - /** - * Specifies a value that indicates whether the comment text has a strikethrough. - * - * @remarks - * [Api set: WordApi 1.4] - */ - strikeThrough?: boolean; - /** - * Gets the text of the comment range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - text?: boolean; - /** - * Specifies a value that indicates the comment text's underline type. 'None' if the comment text isn't underlined. - * - * @remarks - * [Api set: WordApi 1.4] - */ - underline?: boolean; - } - /** - * Represents a comment reply in the document. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.CommentReply} objects. Represents all comment replies in one comment thread. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CommentReplyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies the commentReply's content range. - * - * @remarks - * [Api set: WordApi 1.4] - */ - contentRange?: Word.Interfaces.CommentContentRangeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent comment of this reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentComment?: Word.Interfaces.CommentLoadOptions; - /** - * For EACH ITEM in the collection: Gets the email of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorEmail?: boolean; - /** - * For EACH ITEM in the collection: Gets the name of the comment reply's author. - * - * @remarks - * [Api set: WordApi 1.4] - */ - authorName?: boolean; - /** - * For EACH ITEM in the collection: Specifies the comment reply's content. The string is plain text. - * - * @remarks - * [Api set: WordApi 1.4] - */ - content?: boolean; - /** - * For EACH ITEM in the collection: Gets the creation date of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - creationDate?: boolean; - /** - * For EACH ITEM in the collection: Gets the ID of the comment reply. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - } - - - - - - - - /** - * Represents a content control. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.ContentControl} objects. Content controls are bounded and potentially labeled regions in a document that serve as containers for specific types of content. Individual content controls may contain contents such as images, tables, or paragraphs of formatted text. Currently, only rich text, plain text, checkbox, dropdown list, and combo box content controls are supported. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ContentControlCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - /** - * For EACH ITEM in the collection: Gets the data of the content control when its type is `CheckBox`. It's `null` otherwise. - * - * @remarks - * [Api set: WordApi 1.7] - */ - checkboxContentControl?: Word.Interfaces.CheckboxContentControlLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the text format of the content control. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the content control. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the content control. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the content control. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - - /** - * For EACH ITEM in the collection: Specifies the appearance of the content control. The value can be 'BoundingBox', 'Tags', or 'Hidden'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - appearance?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can delete the content control. Mutually exclusive with removeWhenEdited. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotDelete?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the user can edit the contents of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - cannotEdit?: boolean; - /** - * For EACH ITEM in the collection: Specifies the color of the content control. Color is specified in '#RRGGBB' format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the content control identifier. - * - * @remarks - * [Api set: WordApi 1.1] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Specifies the placeholder text of the content control. Dimmed text will be displayed when the content control is empty. - * - * @remarks - * [Api set: WordApi 1.1] - */ - placeholderText?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the content control is removed after it is edited. Mutually exclusive with cannotDelete. - * - * @remarks - * [Api set: WordApi 1.1] - */ - removeWhenEdited?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the content control. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the content control. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control subtype. The subtype can be 'RichTextInline', 'RichTextParagraphs', 'RichTextTableCell', 'RichTextTableRow' and 'RichTextTable' for rich text content controls, or 'PlainTextInline' and 'PlainTextParagraph' for plain text content controls, or 'CheckBox' for checkbox content controls. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subtype?: boolean; - /** - * For EACH ITEM in the collection: Specifies a tag to identify a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - tag?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Specifies the title for a content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - title?: boolean; - /** - * For EACH ITEM in the collection: Gets the content control type. Only rich text, plain text, and checkbox content controls are supported currently. - * - * @remarks - * [Api set: WordApi 1.1] - */ - type?: boolean; - } - - - /** - * Represents a custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.CustomProperty} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface CustomPropertyCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the custom property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Gets the value type of the custom property. Possible values are: String, Number, Date, Boolean. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the custom property. Note that even though Word on the web and the docx file format allow these properties to be arbitrarily long, the desktop version of Word will truncate string values to 255 16-bit chars (possibly creating invalid unicode by breaking up a surrogate pair). - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - } - /** - * Represents a custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * Contains the collection of {@link Word.CustomXmlPart} objects with a specific namespace. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface CustomXmlPartScopedCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the ID of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Gets the namespace URI of the custom XML part. - * - * @remarks - * [Api set: WordApi 1.4] - */ - namespaceUri?: boolean; - - } - /** - * The Document object is the top level object. A Document object contains one or more sections, content controls, and the body that contains the contents of the document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface DocumentLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - /** - * Gets the body object of the main document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - - - /** - * Specifies the ChangeTracking mode. - * - * @remarks - * [Api set: WordApi 1.4] - */ - changeTrackingMode?: boolean; - - - - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApi 1.1] - */ - saved?: boolean; - } - /** - * The DocumentCreated object is the top level object created by Application.CreateDocument. A DocumentCreated object is a special Document object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentCreatedLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the document. The body is the text that excludes headers, footers, footnotes, textboxes, etc. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the properties of the document. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - properties?: Word.Interfaces.DocumentPropertiesLoadOptions; - /** - * Indicates whether the changes in the document have been saved. A value of true indicates that the document hasn't changed since it was saved. - * - * @remarks - * [Api set: WordApiHiddenDocument 1.3] - */ - saved?: boolean; - } - /** - * Represents document properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface DocumentPropertiesLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the application name of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - applicationName?: boolean; - /** - * Specifies the author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - author?: boolean; - /** - * Specifies the category of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - category?: boolean; - /** - * Specifies the Comments field in the metadata of the document. These have no connection to comments by users made in the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - comments?: boolean; - /** - * Specifies the company of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - company?: boolean; - /** - * Gets the creation date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - creationDate?: boolean; - /** - * Specifies the format of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - format?: boolean; - /** - * Specifies the keywords of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - keywords?: boolean; - /** - * Gets the last author of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastAuthor?: boolean; - /** - * Gets the last print date of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastPrintDate?: boolean; - /** - * Gets the last save time of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - lastSaveTime?: boolean; - /** - * Specifies the manager of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - manager?: boolean; - /** - * Gets the revision number of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - revisionNumber?: boolean; - /** - * Gets security settings of the document. Some are access restrictions on the file on disk. Others are Document Protection settings. Some possible values are 0 = File on disk is read/write; 1 = Protect Document: File is encrypted and requires a password to open; 2 = Protect Document: Always Open as Read-Only; 3 = Protect Document: Both #1 and #2; 4 = File on disk is read-only; 5 = Both #1 and #4; 6 = Both #2 and #4; 7 = All of #1, #2, and #4; 8 = Protect Document: Restrict Edit to read-only; 9 = Both #1 and #8; 10 = Both #2 and #8; 11 = All of #1, #2, and #8; 12 = Both #4 and #8; 13 = All of #1, #4, and #8; 14 = All of #2, #4, and #8; 15 = All of #1, #2, #4, and #8. - * - * @remarks - * [Api set: WordApi 1.3] - */ - security?: boolean; - /** - * Specifies the subject of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - subject?: boolean; - /** - * Gets the template of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - template?: boolean; - /** - * Specifies the title of the document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - title?: boolean; - } - /** - * Represents a field. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.Field} objects. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5. - * Support for managing fields is similar to what's available in the Word UI. However, the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}). - * To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}. - */ - export interface FieldCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent body of the field. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the field. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the field. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the field. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.4] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the field's result data. - * - * @remarks - * [Api set: WordApi 1.4] - */ - result?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the field's code instruction. - * - * @remarks - * [Api set: WordApi 1.4] - * - * Note: The ability to set the code was introduced in WordApi 1.5. - */ - code?: boolean; - /** - * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it. - * - * @remarks - * [Api set: WordApi 1.5] - */ - data?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's kind. - * - * @remarks - * [Api set: WordApi 1.5] - */ - kind?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field is locked. `true` if the field is locked, `false` otherwise. - * - * @remarks - * [Api set: WordApi 1.5] - */ - locked?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the field codes are displayed for the specified field. `true` if the field codes are displayed, `false` otherwise. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - showCodes?: boolean; - /** - * For EACH ITEM in the collection: Gets the field's type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface FontLoadOptions { - /** - 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`). - */ - $all?: boolean; - - - - - - - - - /** - * Specifies a value that indicates whether the font is bold. True if the font is formatted as bold, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - bold?: boolean; - - /** - * Specifies the color for the specified font. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.1] - */ - color?: boolean; - - - - - - /** - * Specifies a value that indicates whether the font has a double strikethrough. True if the font is formatted as double strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - doubleStrikeThrough?: boolean; - - - - /** - * Specifies a value that indicates whether the font is tagged as hidden. True if the font is formatted as hidden text, otherwise, false. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hidden?: boolean; - /** - * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - highlightColor?: boolean; - /** - * Specifies a value that indicates whether the font is italicized. True if the font is italicized, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - italic?: boolean; - - - - /** - * Specifies a value that represents the name of the font. - * - * @remarks - * [Api set: WordApi 1.1] - */ - name?: boolean; - - - - - - - - - - - /** - * Specifies a value that represents the font size in points. - * - * @remarks - * [Api set: WordApi 1.1] - */ - size?: boolean; - - - - /** - * Specifies a value that indicates whether the font has a strikethrough. True if the font is formatted as strikethrough text, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - strikeThrough?: boolean; - - /** - * Specifies a value that indicates whether the font is a subscript. True if the font is formatted as subscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - subscript?: boolean; - /** - * Specifies a value that indicates whether the font is a superscript. True if the font is formatted as superscript, otherwise, false. - * - * @remarks - * [Api set: WordApi 1.1] - */ - superscript?: boolean; - /** - * Specifies a value that indicates the font's underline type. 'None' if the font isn't underlined. - * - * @remarks - * [Api set: WordApi 1.1] - */ - underline?: boolean; - - } - - - /** - * Represents an inline picture. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.InlinePicture} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface InlinePictureCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the parent paragraph that contains the inline image. - * - * @remarks - * [Api set: WordApi 1.2] - */ - paragraph?: Word.Interfaces.ParagraphLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the inline image. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the inline image. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the inline image. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that contains the title for the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - altTextTitle?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the height of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Specifies a hyperlink on the image. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.1] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Gets the format of the inline image. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - imageFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies a value that indicates whether the inline image retains its original proportions when you resize it. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: Specifies a number that describes the width of the inline image. - * - * @remarks - * [Api set: WordApi 1.1] - */ - width?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Contains a collection of {@link Word.List} objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the list's id. - * - * @remarks - * [Api set: WordApi 1.3] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Checks whether each of the 9 levels exists in the list. A true value indicates the level exists, which means there is at least one list item at that level. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelExistences?: boolean; - /** - * For EACH ITEM in the collection: Gets all 9 level types in the list. Each type can be 'Bullet', 'Number', or 'Picture'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - levelTypes?: boolean; - } - /** - * Represents the paragraph list item format. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface ListItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the level of the item in the list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - level?: boolean; - /** - * Gets the list item bullet, number, or picture as a string. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listString?: boolean; - /** - * Gets the list item order number in relation to its siblings. - * - * @remarks - * [Api set: WordApi 1.3] - */ - siblingIndex?: boolean; - } - /** - * Represents a list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Contains a collection of {@link Word.ListLevel} objects. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListLevelCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets a Font object that represents the character formatting of the specified object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the list level. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style that's linked to the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - linkedStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number format for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberFormat?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) of the number or bullet for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number style for the list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - numberStyle?: boolean; - /** - * For EACH ITEM in the collection: Specifies the list level that must appear before the specified list level restarts numbering at 1. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - resetOnHigher?: boolean; - /** - * For EACH ITEM in the collection: Specifies the starting number for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - startAt?: boolean; - /** - * For EACH ITEM in the collection: Specifies the tab position for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - tabPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the position (in points) for the second line of wrapping text for the specified list level object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - textPosition?: boolean; - /** - * For EACH ITEM in the collection: Specifies the character inserted after the number for the specified list level. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - trailingCharacter?: boolean; - } - /** - * Represents a list template. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - export interface ListTemplateLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies whether the list template is outline numbered. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - outlineNumbered?: boolean; - } - /** - * Represents a footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.NoteItem} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface NoteItemCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the note item. It's the portion of the text within the footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Represents a footnote or endnote reference in the main document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - reference?: Word.Interfaces.RangeLoadOptions; - /** - * For EACH ITEM in the collection: Represents the note item type: footnote or endnote. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - } - /** - * Represents a page in the document. `Page` objects manage the page layout and content. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents the collection of page. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface PageCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the height, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the page. The page index is 1-based and independent of the user's custom page numbering. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - index?: boolean; - /** - * For EACH ITEM in the collection: Gets the width, in points, of the paper defined in the Page Setup dialog box. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - } - /** - * Represents a single paragraph in a selection, range, content control, or document body. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Contains a collection of {@link Word.Paragraph} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface ParagraphCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the paragraph. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. Throws an `ItemNotFound` error if the paragraph isn't in a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - list?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. Throws an `ItemNotFound` error if the paragraph isn't part of a list. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItem?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the ListItem for the paragraph. If the paragraph isn't part of a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listItemOrNullObject?: Word.Interfaces.ListItemLoadOptions; - /** - * For EACH ITEM in the collection: Gets the List to which this paragraph belongs. If the paragraph isn't in a list, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - listOrNullObject?: Word.Interfaces.ListLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the paragraph. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the paragraph. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the paragraph. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the paragraph. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the alignment for a paragraph. The value can be 'left', 'centered', 'right', or 'justified'. - * - * @remarks - * [Api set: WordApi 1.1] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value, in points, for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.1] - */ - firstLineIndent?: boolean; - /** - * For EACH ITEM in the collection: Indicates the paragraph is the last one inside its parent body. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isLastParagraph?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the paragraph is a list item. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isListItem?: boolean; - /** - * For EACH ITEM in the collection: Specifies the left indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - leftIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the line spacing, in points, for the specified paragraph. In the Word UI, this value is divided by 12. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineSpacing?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the amount of spacing, in grid lines, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - lineUnitBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the outline level for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - outlineLevel?: boolean; - /** - * For EACH ITEM in the collection: Specifies the right indent value, in points, for the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - rightIndent?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, after the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceAfter?: boolean; - /** - * For EACH ITEM in the collection: Specifies the spacing, in points, before the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - spaceBefore?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the paragraph. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the paragraph. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the level of the paragraph's table. It returns 0 if the paragraph isn't in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - tableNestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the paragraph. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets a string that represents the paragraph identifier in the current session. ID is in standard 8-4-4-4-12 GUID format without curly braces and differs across sessions and coauthors. - * - * @remarks - * [Api set: WordApi 1.6] - */ - uniqueLocalId?: boolean; - } - /** - * Represents a style of paragraph in a document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface ParagraphFormatLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the alignment for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - alignment?: boolean; - /** - * Specifies the value (in points) for a first line or hanging indent. Use a positive value to set a first-line indent, and use a negative value to set a hanging indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - firstLineIndent?: boolean; - /** - * Specifies whether all lines in the specified paragraphs remain on the same page when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepTogether?: boolean; - /** - * Specifies whether the specified paragraph remains on the same page as the paragraph that follows it when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - keepWithNext?: boolean; - /** - * Specifies the left indent. - * - * @remarks - * [Api set: WordApi 1.5] - */ - leftIndent?: boolean; - /** - * Specifies the line spacing (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineSpacing?: boolean; - /** - * Specifies the amount of spacing (in gridlines) after the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitAfter?: boolean; - /** - * Specifies the amount of spacing (in gridlines) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - lineUnitBefore?: boolean; - /** - * Specifies whether left and right indents are the same width. - * - * @remarks - * [Api set: WordApi 1.5] - */ - mirrorIndents?: boolean; - /** - * Specifies the outline level for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - outlineLevel?: boolean; - /** - * Specifies the right indent (in points) for the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - rightIndent?: boolean; - /** - * Specifies the amount of spacing (in points) after the specified paragraph or text column. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceAfter?: boolean; - /** - * Specifies the spacing (in points) before the specified paragraphs. - * - * @remarks - * [Api set: WordApi 1.5] - */ - spaceBefore?: boolean; - /** - * Specifies whether the first and last lines in the specified paragraph remain on the same page as the rest of the paragraph when Microsoft Word repaginates the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - widowControl?: boolean; - } - /** - * Represents a contiguous area in a document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Contains a collection of {@link Word.Range} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface RangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the text format of the range. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.1] - */ - font?: Word.Interfaces.FontLoadOptions; - - /** - * For EACH ITEM in the collection: Gets the parent body of the range. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.1] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the currently supported content control that contains the range. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains the range. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains the range. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets the first hyperlink in the range, or sets a hyperlink on the range. All hyperlinks in the range are deleted when you set a new hyperlink on the range. Use a '#' to separate the address part from the optional location part. - * - * @remarks - * [Api set: WordApi 1.3] - */ - hyperlink?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the range length is zero. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isEmpty?: boolean; - - - - - /** - * For EACH ITEM in the collection: Specifies the style name for the range. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.1] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the range. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the range. - * - * @remarks - * [Api set: WordApi 1.1] - */ - text?: boolean; - } - /** - * Specifies the options to be included in a search operation. - To learn more about how to use search options in the Word JavaScript APIs, read {@link https://learn.microsoft.com/office/dev/add-ins/word/search-option-guidance | Use search options to find text in your Word add-in}. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SearchOptionsLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a value that indicates whether to ignore all punctuation characters between words. Corresponds to the Ignore punctuation check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignorePunct?: boolean; - /** - * Specifies a value that indicates whether to ignore all whitespace between words. Corresponds to the Ignore whitespace characters check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - ignoreSpace?: boolean; - /** - * Specifies a value that indicates whether to perform a case sensitive search. Corresponds to the Match case check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchCase?: boolean; - /** - * Specifies a value that indicates whether to match words that begin with the search string. Corresponds to the Match prefix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchPrefix?: boolean; - /** - * Specifies a value that indicates whether to match words that end with the search string. Corresponds to the Match suffix check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchSuffix?: boolean; - /** - * Specifies a value that indicates whether to find operation only entire words, not text that is part of a larger word. Corresponds to the Find whole words only check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWholeWord?: boolean; - /** - * Specifies a value that indicates whether the search will be performed using special search operators. Corresponds to the Use wildcards check box in the Find and Replace dialog box. - * - * @remarks - * [Api set: WordApi 1.1] - */ - matchWildcards?: boolean; - } - /** - * Represents a section in a Word document. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Contains the collection of the document's {@link Word.Section} objects. - * - * @remarks - * [Api set: WordApi 1.1] - */ - export interface SectionCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the section. This doesn't include the header/footer and other section metadata. - * - * @remarks - * [Api set: WordApi 1.1] - */ - body?: Word.Interfaces.BodyLoadOptions; - - - } - /** - * Represents a setting of the add-in. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains the collection of {@link Word.Setting} objects. - * - * @remarks - * [Api set: WordApi 1.4] - */ - export interface SettingCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the key of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - key?: boolean; - /** - * For EACH ITEM in the collection: Specifies the value of the setting. - * - * @remarks - * [Api set: WordApi 1.4] - */ - value?: boolean; - } - /** - * Contains a collection of {@link Word.Style} objects. - * - * @remarks - * [Api set: WordApi 1.5] - */ - export interface StyleCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * For EACH ITEM in the collection: Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * For EACH ITEM in the collection: Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * For EACH ITEM in the collection: Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * For EACH ITEM in the collection: Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * For EACH ITEM in the collection: Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * For EACH ITEM in the collection: Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * For EACH ITEM in the collection: Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * For EACH ITEM in the collection: Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * For EACH ITEM in the collection: Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * For EACH ITEM in the collection: Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * For EACH ITEM in the collection: Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * For EACH ITEM in the collection: Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents a style in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface StyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies a BorderCollection object that represents all the borders for the specified style. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - borders?: Word.Interfaces.BorderCollectionLoadOptions; - /** - * Gets a font object that represents the character formatting of the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - font?: Word.Interfaces.FontLoadOptions; - - - /** - * Gets a ListTemplate object that represents the list formatting for the specified Style object. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - listTemplate?: Word.Interfaces.ListTemplateLoadOptions; - /** - * Gets a ParagraphFormat object that represents the paragraph settings for the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - paragraphFormat?: Word.Interfaces.ParagraphFormatLoadOptions; - /** - * Gets a Shading object that represents the shading for the specified style. Not applicable to List style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - shading?: Word.Interfaces.ShadingLoadOptions; - /** - * Gets a TableStyle object representing Style properties that can be applied to a table. - * - * @remarks - * [Api set: WordApi 1.6] - */ - tableStyle?: Word.Interfaces.TableStyleLoadOptions; - - /** - * Specifies the name of an existing style to use as the base formatting of another style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `baseStyle` was introduced in WordApi 1.6. - */ - baseStyle?: boolean; - /** - * Gets whether the specified style is a built-in style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - builtIn?: boolean; - - /** - * Gets whether the specified style is a built-in style that has been modified or applied in the document or a new style that has been created in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - inUse?: boolean; - - - /** - * Gets whether a style is a linked style that can be used for both paragraph and character formatting. - * - * @remarks - * [Api set: WordApi 1.5] - */ - linked?: boolean; - - - /** - * Gets the name of a style in the language of the user. - * - * @remarks - * [Api set: WordApi 1.5] - */ - nameLocal?: boolean; - /** - * Specifies the name of the style to be applied automatically to a new paragraph that is inserted after a paragraph formatted with the specified style. - * - * @remarks - * [Api set: WordApi 1.5] - * - * Note: The ability to set `nextParagraphStyle` was introduced in WordApi 1.6. - */ - nextParagraphStyle?: boolean; - - /** - * Specifies the priority. - * - * @remarks - * [Api set: WordApi 1.5] - */ - priority?: boolean; - /** - * Specifies whether the style corresponds to an available quick style. - * - * @remarks - * [Api set: WordApi 1.5] - */ - quickStyle?: boolean; - /** - * Gets the style type. - * - * @remarks - * [Api set: WordApi 1.5] - */ - type?: boolean; - /** - * Specifies whether the specified style is made visible as a recommended style in the Styles and in the Styles task pane in Microsoft Word after it's used in the document. - * - * @remarks - * [Api set: WordApi 1.5] - */ - unhideWhenUsed?: boolean; - /** - * Specifies whether the specified style is visible as a recommended style in the Styles gallery and in the Styles task pane. - * - * @remarks - * [Api set: WordApi 1.5] - */ - visibility?: boolean; - } - /** - * Represents the shading object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface ShadingLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the color for the background of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApi 1.6] - */ - backgroundPatternColor?: boolean; - /** - * Specifies the color for the foreground of the object. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - foregroundPatternColor?: boolean; - /** - * Specifies the shading texture of the object. To learn more about how to apply backgrounds like textures, see {@link https://support.microsoft.com/office/db481e61-7af6-4063-bbcd-b276054a5515 | Add, change, or delete the background color in Word}. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - texture?: boolean; - } - - /** - * Represents a table in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Represents the TableStyle object. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TableStyleLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table's alignment against the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - alignment?: boolean; - /** - * Specifies whether lines in tables formatted with a specified style break across pages. - * - * @remarks - * [Api set: WordApiDesktop 1.1] - */ - allowBreakAcrossPage?: boolean; - /** - * Specifies the amount of space to add between the contents and the bottom borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - bottomCellMargin?: boolean; - /** - * Specifies the spacing (in points) between the cells in a table style. - * - * @remarks - * [Api set: WordApi 1.6] - */ - cellSpacing?: boolean; - /** - * Specifies the amount of space to add between the contents and the left borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - leftCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the right borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - rightCellMargin?: boolean; - /** - * Specifies the amount of space to add between the contents and the top borders of the cells. - * - * @remarks - * [Api set: WordApi 1.6] - */ - topCellMargin?: boolean; - } - /** - * Contains the collection of the document's Table objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent body of the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentBody?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. Throws an `ItemNotFound` error if there isn't a parent content control. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControl?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the content control that contains the table. If there isn't a parent content control, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentContentControlOrNullObject?: Word.Interfaces.ContentControlLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. Throws an `ItemNotFound` error if it isn't contained in a table cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCell?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table cell that contains this table. If it isn't contained in a table cell, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableCellOrNullObject?: Word.Interfaces.TableCellLoadOptions; - /** - * For EACH ITEM in the collection: Gets the table that contains this table. If it isn't contained in a table, then this method will return an object with its `isNullObject` property set to `true`. For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTableOrNullObject?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Specifies the alignment of the table against the page column. The value can be 'Left', 'Centered', or 'Right'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - alignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the number of header rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - headerRowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the table. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Indicates whether all of the table rows are uniform. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isUniform?: boolean; - /** - * For EACH ITEM in the collection: Gets the nesting level of the table. Top-level tables have level 1. - * - * @remarks - * [Api set: WordApi 1.3] - */ - nestingLevel?: boolean; - /** - * For EACH ITEM in the collection: Gets the number of rows in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the style name for the table. Use this property for custom styles and localized style names. To use the built-in styles that are portable between locales, see the "styleBuiltIn" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - style?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded columns. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedColumns?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has banded rows. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBandedRows?: boolean; - /** - * For EACH ITEM in the collection: Specifies the built-in style name for the table. Use this property for built-in styles that are portable between locales. To use custom styles or localized style names, see the "style" property. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleBuiltIn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a first column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleFirstColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a last column with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleLastColumn?: boolean; - /** - * For EACH ITEM in the collection: Specifies whether the table has a total (last) row with a special style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - styleTotalRow?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the table, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of every cell in the table. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the table in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a row in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Contains the collection of the document's TableRow objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableRowCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the font. Use this to get and set font name, size, color, and other properties. - * - * @remarks - * [Api set: WordApi 1.3] - */ - font?: Word.Interfaces.FontLoadOptions; - /** - * For EACH ITEM in the collection: Gets parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the number of cells in the row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellCount?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of every cell in the row. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Checks whether the row is a header row. To set the number of header rows, use `headerRowCount` on the Table object. - * - * @remarks - * [Api set: WordApi 1.3] - */ - isHeader?: boolean; - /** - * For EACH ITEM in the collection: Specifies the preferred height of the row in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - preferredHeight?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the row in its parent table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text values in the row, as a 2D JavaScript array. - * - * @remarks - * [Api set: WordApi 1.3] - */ - values?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cells in the row. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - } - /** - * Represents a table cell in a Word document. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Contains the collection of the document's TableCell objects. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableCellCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the body object of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent row of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentRow?: Word.Interfaces.TableRowLoadOptions; - /** - * For EACH ITEM in the collection: Gets the parent table of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - parentTable?: Word.Interfaces.TableLoadOptions; - /** - * For EACH ITEM in the collection: Gets the index of the cell in its row. - * - * @remarks - * [Api set: WordApi 1.3] - */ - cellIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the width of the cell's column in points. This is applicable to uniform tables. - * - * @remarks - * [Api set: WordApi 1.3] - */ - columnWidth?: boolean; - /** - * For EACH ITEM in the collection: Specifies the horizontal alignment of the cell. The value can be 'Left', 'Centered', 'Right', or 'Justified'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - horizontalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the index of the cell's row in the table. - * - * @remarks - * [Api set: WordApi 1.3] - */ - rowIndex?: boolean; - /** - * For EACH ITEM in the collection: Specifies the shading color of the cell. Color is specified in "#RRGGBB" format or by using the color name. - * - * @remarks - * [Api set: WordApi 1.3] - */ - shadingColor?: boolean; - /** - * For EACH ITEM in the collection: Specifies the text of the cell. - * - * @remarks - * [Api set: WordApi 1.3] - */ - value?: boolean; - /** - * For EACH ITEM in the collection: Specifies the vertical alignment of the cell. The value can be 'Top', 'Center', or 'Bottom'. - * - * @remarks - * [Api set: WordApi 1.3] - */ - verticalAlignment?: boolean; - /** - * For EACH ITEM in the collection: Gets the width of the cell in points. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - /** - * Specifies the border style. - * - * @remarks - * [Api set: WordApi 1.3] - */ - export interface TableBorderLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the table border color. - * - * @remarks - * [Api set: WordApi 1.3] - */ - color?: boolean; - /** - * Specifies the type of the table border. - * - * @remarks - * [Api set: WordApi 1.3] - */ - type?: boolean; - /** - * Specifies the width, in points, of the table border. Not applicable to table border types that have fixed widths. - * - * @remarks - * [Api set: WordApi 1.3] - */ - width?: boolean; - } - - - /** - * Represents a tracked change in a Word document. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Contains a collection of {@link Word.TrackedChange} objects. - * - * @remarks - * [Api set: WordApi 1.6] - */ - export interface TrackedChangeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Gets the author of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - author?: boolean; - /** - * For EACH ITEM in the collection: Gets the date of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - date?: boolean; - /** - * For EACH ITEM in the collection: Gets the text of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - text?: boolean; - /** - * For EACH ITEM in the collection: Gets the type of the tracked change. - * - * @remarks - * [Api set: WordApi 1.6] - */ - type?: boolean; - } - /** - * Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents a shape group in the document. To get the corresponding Shape object, use ShapeGroup.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeGroupLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the shape group identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Represents a canvas in the document. To get the corresponding Shape object, use Canvas.shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface CanvasLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Gets the Shape object associated with the canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shape?: Word.Interfaces.ShapeLoadOptions; - /** - * Gets an integer that represents the canvas identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - } - /** - * Contains a collection of {@link Word.Shape} objects. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeCollectionLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * For EACH ITEM in the collection: Represents the body object of the shape. Only applies to text boxes and geometric shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - body?: Word.Interfaces.BodyLoadOptions; - /** - * For EACH ITEM in the collection: Gets the canvas associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "Canvas". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - canvas?: Word.Interfaces.CanvasLoadOptions; - /** - * For EACH ITEM in the collection: Returns the fill formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - fill?: Word.Interfaces.ShapeFillLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentCanvas?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - parentGroup?: Word.Interfaces.ShapeLoadOptions; - /** - * For EACH ITEM in the collection: Gets the shape group associated with the shape. An object with its `isNullObject` property set to `true` will be returned if the shape type isn't "GroupShape". For further information, see {@link https://learn.microsoft.com/office/dev/add-ins/develop/application-specific-api-model#ornullobject-methods-and-properties | *OrNullObject methods and properties}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions; - /** - * For EACH ITEM in the collection: Gets the text frame object of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textFrame?: Word.Interfaces.TextFrameLoadOptions; - /** - * For EACH ITEM in the collection: Returns the text wrap formatting of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions; - /** - * For EACH ITEM in the collection: Specifies whether a given shape can overlap other shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - allowOverlap?: boolean; - /** - * For EACH ITEM in the collection: Specifies a string that represents the alternative text associated with the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - altTextDescription?: boolean; - /** - * For EACH ITEM in the collection: The geometric shape type of the shape. It will be null if isn't a geometric shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - geometricShapeType?: boolean; - /** - * For EACH ITEM in the collection: The height, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - height?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape height to vertical relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - heightRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets an integer that represents the shape identifier. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - id?: boolean; - /** - * For EACH ITEM in the collection: Check whether this shape is a child of a group shape or a canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - isChild?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - left?: boolean; - /** - * For EACH ITEM in the collection: The relative left position as a percentage from the left side of the shape to the horizontal relative position, see {@link Word.RelativeHorizontalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftRelative?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the aspect ratio of this shape is locked. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - lockAspectRatio?: boolean; - /** - * For EACH ITEM in the collection: The name of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - name?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeHorizontalSize?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical position of the shape. For an inline shape, it can't be set. For details, see {@link Word.RelativeVerticalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalPosition?: boolean; - /** - * For EACH ITEM in the collection: The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see {@link Word.RelativeHorizontalPosition}. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - relativeVerticalSize?: boolean; - /** - * For EACH ITEM in the collection: Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rotation?: boolean; - /** - * For EACH ITEM in the collection: The distance, in points, from the top edge of the shape to the vertical relative position (see {@link Word.RelativeVerticalPosition}). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - top?: boolean; - /** - * For EACH ITEM in the collection: The relative top position as a percentage from the top edge of the shape to the vertical relative position, see {@link Word.RelativeVerticalPosition}. For an inline or child shape, it will return 0 and can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topRelative?: boolean; - /** - * For EACH ITEM in the collection: Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - /** - * For EACH ITEM in the collection: Specifies if the shape is visible. Not applicable to inline shapes. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - visible?: boolean; - /** - * For EACH ITEM in the collection: The width, in points, of the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - width?: boolean; - /** - * For EACH ITEM in the collection: The percentage of shape width to horizontal relative size, see {@link Word.RelativeSize}. For an inline or child shape, it can't be set. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - widthRelative?: boolean; - } - /** - * Represents the fill formatting of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeFillLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the shape fill background color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - backgroundColor?: boolean; - /** - * Specifies the shape fill foreground color. You can provide the value in the '#RRGGBB' format or the color name. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - foregroundColor?: boolean; - /** - * Specifies the transparency percentage of the fill as a value from 0.0 (opaque) through 1.0 (clear). Returns `null` if the shape type does not support transparency or the shape fill has inconsistent transparency, such as with a gradient fill type. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - transparency?: boolean; - /** - * Returns the fill type of the shape. See `Word.ShapeFillType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - /** - * Represents the text frame of a shape object. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface TextFrameLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - autoSizeSetting?: boolean; - /** - * Represents the bottom margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomMargin?: boolean; - /** - * Specifies if the text frame contains text. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - hasText?: boolean; - /** - * Represents the left margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftMargin?: boolean; - /** - * Returns True if text in the text frame shouldn't rotate when the shape is rotated. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - noTextRotation?: boolean; - /** - * Represents the angle to which the text is oriented for the text frame. See `Word.ShapeTextOrientation` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - orientation?: boolean; - /** - * Represents the right margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightMargin?: boolean; - /** - * Represents the top margin, in points, of the text frame. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topMargin?: boolean; - /** - * Represents the vertical alignment of the text frame. See `Word.ShapeTextVerticalAlignment` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - verticalAlignment?: boolean; - /** - * Determines whether lines break automatically to fit text inside the shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - wordWrap?: boolean; - } - /** - * Represents all the properties for wrapping text around a shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - export interface ShapeTextWrapLoadOptions { - /** - 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`). - */ - $all?: boolean; - /** - * Specifies the distance (in points) between the document text and the bottom edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - bottomDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the left edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - leftDistance?: boolean; - /** - * Specifies the distance (in points) between the document text and the right edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - rightDistance?: boolean; - /** - * Specifies whether the document text should wrap on both sides of the specified shape, on either the left or right side only, or on the side of the shape that's farthest from the page margin. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - side?: boolean; - /** - * Specifies the distance (in points) between the document text and the top edge of the text-free area surrounding the specified shape. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - topDistance?: boolean; - /** - * Specifies the text wrap type around the shape. See `Word.ShapeTextWrapType` for details. - * - * @remarks - * [Api set: WordApiDesktop 1.2] - */ - type?: boolean; - } - - - - - - - - - - - - - - - - - - - - - - - - - - } -} -export declare namespace Word { - /** - * The RequestContext object facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the request context is required to get access to the Word object model from the add-in. - */ - export class RequestContext extends OfficeExtension.ClientRequestContext { - constructor(url?: string); - readonly document: Document; - /** [Api set: WordApi 1.3] **/ - readonly application: Application; - } - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of previously created API objects. - * @param objects - An array of previously created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using the RequestContext of a previously created API object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param object - A previously created API object. The batch will use the same RequestContext as the passed-in object, which means that any changes applied to the object will be picked up by `context.sync()`. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(object: OfficeExtension.ClientObject, batch: (context: Word.RequestContext) => Promise): Promise; - /** - * Executes a batch script that performs actions on the Word object model, using a new RequestContext. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released. - * @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of `context.sync()`). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in. - */ - export function run(batch: (context: Word.RequestContext) => Promise): Promise; -} - - -//////////////////////////////////////////////////////////////// -//////////////////////// End Word APIs ///////////////////////// -//////////////////////////////////////////////////////////////// \ No newline at end of file