PowerPoint.SensitivityLabelUpdateResult interface
Observação
Esta API é fornecida como uma versão prévia para desenvolvedores e pode ser alterada com base nos comentários que recebemos. Não use esta API em um ambiente de produção.
Representa o resultado de uma tentativa de atualizar o rótulo de confidencialidade na apresentação. Contém o status do resultado, além de informações de diagnóstico sobre por que a atualização foi bem-sucedida ou falhou.
Comentários
Conjunto de APIs: PowerPointApi BETA (SOMENTE VISUALIZAÇÃO)
Usada por
Exemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/preview-apis/manage-sensitivity-labels.yaml
await PowerPoint.run(async (context) => {
// Apply the selected sensitivity label to the presentation.
const labelId = (document.getElementById("label-id") as HTMLSelectElement).value;
if (!labelId) {
console.warn("Get the available labels, and then select a label to apply.");
return;
}
const presentation: PowerPoint.Presentation = context.presentation;
const presentationLabel: PowerPoint.SensitivityLabel = presentation.sensitivityLabel;
const updateResult: OfficeExtension.ClientResult<PowerPoint.SensitivityLabelUpdateResult> =
presentationLabel.tryToUpdate(labelId);
await context.sync();
if (updateResult.value.status === PowerPoint.SensitivityLabelUpdateStatus.success) {
console.log("Applied the sensitivity label to the presentation.");
} else {
console.error(`The sensitivity label wasn't applied. Status: ${updateResult.value.status}`);
}
});
Propriedades
| status | Obtém o status do resultado da tentativa de atualização. |
Detalhes da propriedade
status
Observação
Esta API é fornecida como uma versão prévia para desenvolvedores e pode ser alterada com base nos comentários que recebemos. Não use esta API em um ambiente de produção.
Obtém o status do resultado da tentativa de atualização.
status: PowerPoint.SensitivityLabelUpdateStatus | "Success" | "UnspecifiedFailure" | "LabelNotFound" | "DocumentReadOnly" | "InsufficientPermission" | "UnsupportedDoubleKeyEncryption" | "LabelingDisabled" | "UserNotFound" | "UnsupportedUdp" | "ParentLabelNotSupported" | "CrossTenant" | "AbacAttributesNotAllowed" | "AbacAttributesRequired" | "UnsupportedAbac" | "LabelDisabled" | "RemovingLabelNotSupported";
Valor da propriedade
PowerPoint.SensitivityLabelUpdateStatus | "Success" | "UnspecifiedFailure" | "LabelNotFound" | "DocumentReadOnly" | "InsufficientPermission" | "UnsupportedDoubleKeyEncryption" | "LabelingDisabled" | "UserNotFound" | "UnsupportedUdp" | "ParentLabelNotSupported" | "CrossTenant" | "AbacAttributesNotAllowed" | "AbacAttributesRequired" | "UnsupportedAbac" | "LabelDisabled" | "RemovingLabelNotSupported"