OfficeExtension.ClientObject class   
一个抽象代理对象,表示 Office 文档中的对象。 可以从上下文 (或其他代理对象) 创建代理对象,将命令添加到队列以对对象进行作,然后通过调用 context.sync()将代理对象状态与文档同步。
属性
| context | 与 对象关联的请求上下文 | 
| is | 返回一个布尔值,该值指示相应的对象是否为 null 对象。 在读取 isNullObject 属性之前,必须调用  | 
属性详细信息
context
与 对象关联的请求上下文
context: ClientRequestContext;属性值
示例
// *.run methods automatically create an OfficeExtension.ClientRequestContext
// object to work with the Office file.
await Excel.run(async (context: Excel.RequestContext) => {
  // `context` is the Excel-specific extension of OfficeExtension.ClientRequestContext.
  
  const workbook = context.workbook;
  // Interact with the Excel workbook...
});
		isNullObject
	  
	返回一个布尔值,该值指示相应的对象是否为 null 对象。 在读取 isNullObject 属性之前,必须调用 context.sync() 。
isNullObject: boolean;属性值
boolean
示例
// This Word snippet sets the hyperlink URL of a selected image. 
await Word.run(async (context) => {
    const selection = context.document.getSelection();
    const firstImage = selection.inlinePictures.getFirstOrNullObject();
    await context.sync();
    // Check if an image was selected before changing its property.
    if (!firstImage.isNullObject) {
        firstImage.hyperlink = "https://www.microsoft.com";
    } else {
        console.log("No image selected");
    }
    await context.sync();
});