Edit

PowerPoint.SensitivityLabel class

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the sensitivity label on the presentation.

Extends

Properties

context

The request context associated with the object. This connects the add-in's process to the Office host application's process.

Methods

getCurrentOrNullObject()

Gets the current label information that exists on the presentation for the user. If there's no sensitivity label on the current presentation, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

toJSON()

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original PowerPoint.SensitivityLabel object is an API object, the toJSON method returns a plain JavaScript object (typed as PowerPoint.Interfaces.SensitivityLabelData) that contains shallow copies of any loaded child properties from the original object.

tryToUpdate(labelId)

Tries to update to the provided sensitivity label on the presentation for the user.

Property Details

context

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The request context associated with the object. This connects the add-in's process to the Office host application's process.

context: RequestContext;

Property Value

Method Details

getCurrentOrNullObject()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the current label information that exists on the presentation for the user. If there's no sensitivity label on the current presentation, an object with an isNullObject property set to true is returned. For further information, see *OrNullObject methods and properties.

getCurrentOrNullObject(): PowerPoint.SensitivityLabelDetails;

Returns

The current SensitivityLabelDetails object.

Remarks

API set: PowerPointApi BETA (PREVIEW ONLY)

toJSON()

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Overrides the JavaScript toJSON() method in order to provide more useful output when an API object is passed to JSON.stringify(). (JSON.stringify, in turn, calls the toJSON method of the object that's passed to it.) Whereas the original PowerPoint.SensitivityLabel object is an API object, the toJSON method returns a plain JavaScript object (typed as PowerPoint.Interfaces.SensitivityLabelData) that contains shallow copies of any loaded child properties from the original object.

toJSON(): {
            [key: string]: string;
        };

Returns

{ [key: string]: string; }

tryToUpdate(labelId)

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Tries to update to the provided sensitivity label on the presentation for the user.

tryToUpdate(labelId: string): OfficeExtension.ClientResult<PowerPoint.SensitivityLabelUpdateResult>;

Parameters

labelId

string

The ID of the label to apply.

Returns

The SensitivityLabelUpdateResult object.

Remarks

API set: PowerPointApi BETA (PREVIEW ONLY)