PowerPoint.RequestContext class

RequestContext 对象有助于请求 PowerPoint 应用程序。 由于 Office 加载项和 PowerPoint 应用程序在两个不同的进程中运行,因此需要请求上下文才能从加载项获取对 PowerPoint 对象模型的访问权限。

扩展

注解

使用方

示例

// *.run methods automatically create an OfficeExtension.ClientRequestContext
// object to work with the Office file.
await PowerPoint.run(async (context) => {
  const presentation = context.presentation;
  // Interact with the PowerPoint presentation...
});

构造函数

(constructor)(url)

构造类的新 RequestContext 实例

构造函数详细信息

(constructor)(url)

构造类的新 RequestContext 实例

constructor(url?: string);

参数

url

string

属性详细信息

application

readonly application: Application;

属性值

presentation

readonly presentation: Presentation;

属性值

sensitivityLabelsCatalog

readonly sensitivityLabelsCatalog: any;

属性值

any